aboutsummaryrefslogtreecommitdiff
path: root/source/compiler/aslcodegen.c
diff options
context:
space:
mode:
authorJung-uk Kim <jkim@FreeBSD.org>2016-02-12 18:53:29 +0000
committerJung-uk Kim <jkim@FreeBSD.org>2016-02-12 18:53:29 +0000
commit67ac2c42d552618270f8ba5431d63944a35a0ee7 (patch)
tree5c13158cdf7d0b9ff31cb1f23b72fa64440df238 /source/compiler/aslcodegen.c
parent176870a6cad869aa9bbb6b7906be146cc651c359 (diff)
downloadsrc-67ac2c42d552618270f8ba5431d63944a35a0ee7.tar.gz
src-67ac2c42d552618270f8ba5431d63944a35a0ee7.zip
Import ACPICA 20160212.vendor/acpica/20160212
Notes
Notes: svn path=/vendor-sys/acpica/dist/; revision=295571 svn path=/vendor-sys/acpica/20160212/; revision=295572; tag=vendor/acpica/20160212
Diffstat (limited to 'source/compiler/aslcodegen.c')
-rw-r--r--source/compiler/aslcodegen.c67
1 files changed, 30 insertions, 37 deletions
diff --git a/source/compiler/aslcodegen.c b/source/compiler/aslcodegen.c
index 08fcc3748d45..5e25d0d24441 100644
--- a/source/compiler/aslcodegen.c
+++ b/source/compiler/aslcodegen.c
@@ -97,22 +97,16 @@ CgGenerateAmlOutput (
void)
{
- DbgPrint (ASL_DEBUG_OUTPUT, "\nWriting AML\n\n");
-
/* Generate the AML output file */
FlSeekFile (ASL_FILE_SOURCE_OUTPUT, 0);
Gbl_SourceLine = 0;
Gbl_NextError = Gbl_ErrorLog;
- TrWalkParseTree (RootNode, ASL_WALK_VISIT_DOWNWARD,
+ TrWalkParseTree (Gbl_ParseTreeRoot, ASL_WALK_VISIT_DOWNWARD,
CgAmlWriteWalk, NULL, NULL);
- DbgPrint (ASL_TREE_OUTPUT,
- "%*s Value P_Op A_Op OpLen PByts Len SubLen PSubLen OpPtr"
- " Parent Child Next Flags AcTyp Final Col L# EL# LL# ELL#\n",
- 76, " ");
-
+ DbgPrint (ASL_TREE_OUTPUT, ASL_PARSE_TREE_HEADER2);
CgCloseTable ();
}
@@ -136,40 +130,43 @@ CgAmlWriteWalk (
void *Context)
{
- /*
- * Print header at level 0. Alignment assumes 32-bit pointers
- */
- if (!Level)
+ /* Generate the AML for this node */
+
+ CgWriteNode (Op);
+
+ if (!Gbl_DebugFlag)
{
- DbgPrint (ASL_TREE_OUTPUT,
- "Final parse tree used for AML output:\n");
- DbgPrint (ASL_TREE_OUTPUT,
- "%*s Value P_Op A_Op OpLen PByts Len SubLen PSubLen OpPtr"
- " Parent Child Next Flags AcTyp Final Col L# EL# LL# ELL#\n",
- 76, " ");
+ return (AE_OK);
}
- /* Debug output */
-
- DbgPrint (ASL_TREE_OUTPUT,
- "%5.5d [%2d]", Op->Asl.LogicalLineNumber, Level);
- UtPrintFormattedName (Op->Asl.ParseOpcode, Level);
+ /* Print header at level 0. Alignment assumes 32-bit pointers */
- if (Op->Asl.ParseOpcode == PARSEOP_NAMESEG ||
- Op->Asl.ParseOpcode == PARSEOP_NAMESTRING ||
- Op->Asl.ParseOpcode == PARSEOP_METHODCALL)
+ if (!Level)
{
DbgPrint (ASL_TREE_OUTPUT,
- "%10.32s ", Op->Asl.ExternalName);
+ "\nFinal parse tree used for AML output:\n");
+ DbgPrint (ASL_TREE_OUTPUT, ASL_PARSE_TREE_HEADER2);
}
- else
+
+ /* Dump ParseOp name and possible value */
+
+ switch (Op->Asl.ParseOpcode)
{
- DbgPrint (ASL_TREE_OUTPUT, " ");
+ case PARSEOP_NAMESEG:
+ case PARSEOP_NAMESTRING:
+ case PARSEOP_METHODCALL:
+ case PARSEOP_STRING_LITERAL:
+
+ UtDumpStringOp (Op, Level);
+ break;
+
+ default:
+
+ UtDumpBasicOp (Op, Level);
+ break;
}
- DbgPrint (ASL_TREE_OUTPUT,
- "%08X %04X %04X %01X %04X %04X %04X %04X "
- "%08X %08X %08X %08X %08X %08X %04X %02d %02d %02d %02d %02d\n",
+ DbgPrint (ASL_TREE_OUTPUT, ASL_PARSE_TREE_DEBUG2,
/* 1 */ (UINT32) Op->Asl.Value.Integer,
/* 2 */ Op->Asl.ParseOpcode,
/* 3 */ Op->Asl.AmlOpcode,
@@ -191,9 +188,6 @@ CgAmlWriteWalk (
/* 19 */ Op->Asl.LogicalLineNumber,
/* 20 */ Op->Asl.EndLogicalLine);
- /* Generate the AML for this node */
-
- CgWriteNode (Op);
return (AE_OK);
}
@@ -558,7 +552,7 @@ CgCloseTable (
/* Process all definition blocks */
- Op = RootNode->Asl.Child;
+ Op = Gbl_ParseTreeRoot->Asl.Child;
while (Op)
{
CgUpdateHeader (Op);
@@ -590,7 +584,6 @@ CgWriteNode (
/* TBD: this may not be the best place for this check */
if ((Op->Asl.ParseOpcode == PARSEOP_DEFAULT_ARG) ||
- (Op->Asl.ParseOpcode == PARSEOP_EXTERNAL) ||
(Op->Asl.ParseOpcode == PARSEOP_INCLUDE) ||
(Op->Asl.ParseOpcode == PARSEOP_INCLUDE_END))
{