mirror of
https://github.com/acpica/acpica/
synced 2025-04-04 12:33:22 +03:00
iASL: Fix listing output for switch operator.
Switch caused the AML listing output to be suspended until much later in the listing file. This change fixes the problem.
This commit is contained in:
parent
25999a4189
commit
6ac92ae253
@ -470,6 +470,7 @@ TrDoSwitch (
|
|||||||
ACPI_PARSE_OBJECT *MethodOp;
|
ACPI_PARSE_OBJECT *MethodOp;
|
||||||
ACPI_PARSE_OBJECT *StoreOp;
|
ACPI_PARSE_OBJECT *StoreOp;
|
||||||
ACPI_PARSE_OBJECT *BreakOp;
|
ACPI_PARSE_OBJECT *BreakOp;
|
||||||
|
ACPI_PARSE_OBJECT *BufferOp;
|
||||||
char *PredicateValueName;
|
char *PredicateValueName;
|
||||||
UINT16 Index;
|
UINT16 Index;
|
||||||
UINT32 Btype;
|
UINT32 Btype;
|
||||||
@ -719,6 +720,7 @@ TrDoSwitch (
|
|||||||
|
|
||||||
Predicate = StartNode->Asl.Child;
|
Predicate = StartNode->Asl.Child;
|
||||||
NewOp = TrCreateLeafNode (PARSEOP_NAME);
|
NewOp = TrCreateLeafNode (PARSEOP_NAME);
|
||||||
|
TrAmlInitLineNumbers (NewOp, StartNode);
|
||||||
|
|
||||||
/* Find the parent method */
|
/* Find the parent method */
|
||||||
|
|
||||||
@ -762,6 +764,7 @@ TrDoSwitch (
|
|||||||
|
|
||||||
NewOp2 = TrCreateValuedLeafNode (PARSEOP_NAMESEG,
|
NewOp2 = TrCreateValuedLeafNode (PARSEOP_NAMESEG,
|
||||||
(UINT64) ACPI_TO_INTEGER (PredicateValueName));
|
(UINT64) ACPI_TO_INTEGER (PredicateValueName));
|
||||||
|
TrAmlInitLineNumbers (NewOp2, NewOp);
|
||||||
NewOp2->Asl.CompileFlags |= NODE_IS_NAME_DECLARATION;
|
NewOp2->Asl.CompileFlags |= NODE_IS_NAME_DECLARATION;
|
||||||
NewOp->Asl.Child = NewOp2;
|
NewOp->Asl.Child = NewOp2;
|
||||||
|
|
||||||
@ -772,21 +775,27 @@ TrDoSwitch (
|
|||||||
case ACPI_BTYPE_INTEGER:
|
case ACPI_BTYPE_INTEGER:
|
||||||
NewOp2->Asl.Next = TrCreateValuedLeafNode (PARSEOP_ZERO,
|
NewOp2->Asl.Next = TrCreateValuedLeafNode (PARSEOP_ZERO,
|
||||||
(UINT64) 0);
|
(UINT64) 0);
|
||||||
|
TrAmlInitLineNumbers (NewOp2->Asl.Next, NewOp);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ACPI_BTYPE_STRING:
|
case ACPI_BTYPE_STRING:
|
||||||
NewOp2->Asl.Next = TrCreateValuedLeafNode (PARSEOP_STRING_LITERAL,
|
NewOp2->Asl.Next = TrCreateValuedLeafNode (PARSEOP_STRING_LITERAL,
|
||||||
(UINT64) ACPI_TO_INTEGER (""));
|
(UINT64) ACPI_TO_INTEGER (""));
|
||||||
|
TrAmlInitLineNumbers (NewOp2->Asl.Next, NewOp);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ACPI_BTYPE_BUFFER:
|
case ACPI_BTYPE_BUFFER:
|
||||||
(void) TrLinkPeerNode (NewOp2, TrCreateValuedLeafNode (PARSEOP_BUFFER,
|
(void) TrLinkPeerNode (NewOp2, TrCreateValuedLeafNode (PARSEOP_BUFFER,
|
||||||
(UINT64) 0));
|
(UINT64) 0));
|
||||||
Next = NewOp2->Asl.Next;
|
Next = NewOp2->Asl.Next;
|
||||||
|
TrAmlInitLineNumbers (Next, NewOp2);
|
||||||
(void) TrLinkChildren (Next, 1, TrCreateValuedLeafNode (PARSEOP_ZERO,
|
(void) TrLinkChildren (Next, 1, TrCreateValuedLeafNode (PARSEOP_ZERO,
|
||||||
(UINT64) 1));
|
(UINT64) 1));
|
||||||
(void) TrLinkPeerNode (Next->Asl.Child,
|
TrAmlInitLineNumbers (Next->Asl.Child, Next);
|
||||||
TrCreateValuedLeafNode (PARSEOP_DEFAULT_ARG, (UINT64) 0));
|
|
||||||
|
BufferOp = TrCreateValuedLeafNode (PARSEOP_DEFAULT_ARG, (UINT64) 0);
|
||||||
|
TrAmlInitLineNumbers (BufferOp, Next->Asl.Child);
|
||||||
|
(void) TrLinkPeerNode (Next->Asl.Child, BufferOp);
|
||||||
|
|
||||||
TrAmlSetSubtreeParent (Next->Asl.Child, Next);
|
TrAmlSetSubtreeParent (Next->Asl.Child, Next);
|
||||||
break;
|
break;
|
||||||
@ -805,6 +814,7 @@ TrDoSwitch (
|
|||||||
*/
|
*/
|
||||||
TrAmlInitNode (StartNode, PARSEOP_WHILE);
|
TrAmlInitNode (StartNode, PARSEOP_WHILE);
|
||||||
NewOp = TrCreateLeafNode (PARSEOP_ONE);
|
NewOp = TrCreateLeafNode (PARSEOP_ONE);
|
||||||
|
TrAmlInitLineNumbers (NewOp, StartNode);
|
||||||
NewOp->Asl.Next = Predicate->Asl.Next;
|
NewOp->Asl.Next = Predicate->Asl.Next;
|
||||||
NewOp->Asl.Parent = StartNode;
|
NewOp->Asl.Parent = StartNode;
|
||||||
StartNode->Asl.Child = NewOp;
|
StartNode->Asl.Child = NewOp;
|
||||||
@ -812,6 +822,7 @@ TrDoSwitch (
|
|||||||
/* Create a Store() node */
|
/* Create a Store() node */
|
||||||
|
|
||||||
StoreOp = TrCreateLeafNode (PARSEOP_STORE);
|
StoreOp = TrCreateLeafNode (PARSEOP_STORE);
|
||||||
|
TrAmlInitLineNumbers (StoreOp, NewOp);
|
||||||
StoreOp->Asl.Parent = StartNode;
|
StoreOp->Asl.Parent = StartNode;
|
||||||
TrAmlInsertPeer (NewOp, StoreOp);
|
TrAmlInsertPeer (NewOp, StoreOp);
|
||||||
|
|
||||||
@ -822,6 +833,7 @@ TrDoSwitch (
|
|||||||
|
|
||||||
NewOp = TrCreateValuedLeafNode (PARSEOP_NAMESEG,
|
NewOp = TrCreateValuedLeafNode (PARSEOP_NAMESEG,
|
||||||
(UINT64) ACPI_TO_INTEGER (PredicateValueName));
|
(UINT64) ACPI_TO_INTEGER (PredicateValueName));
|
||||||
|
TrAmlInitLineNumbers (NewOp, StoreOp);
|
||||||
NewOp->Asl.Parent = StoreOp;
|
NewOp->Asl.Parent = StoreOp;
|
||||||
Predicate->Asl.Next = NewOp;
|
Predicate->Asl.Next = NewOp;
|
||||||
|
|
||||||
@ -834,6 +846,7 @@ TrDoSwitch (
|
|||||||
}
|
}
|
||||||
|
|
||||||
BreakOp = TrCreateLeafNode (PARSEOP_BREAK);
|
BreakOp = TrCreateLeafNode (PARSEOP_BREAK);
|
||||||
|
TrAmlInitLineNumbers (BreakOp, NewOp);
|
||||||
BreakOp->Asl.Parent = StartNode;
|
BreakOp->Asl.Parent = StartNode;
|
||||||
TrAmlInsertPeer (Conditional, BreakOp);
|
TrAmlInsertPeer (Conditional, BreakOp);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user