1 /*******************************************************************************
3 * Module Name: dmopcode - AML disassembler, specific AML opcodes
5 ******************************************************************************/
8 * Copyright (C) 2000 - 2016, Intel Corp.
11 * Redistribution and use in source and binary forms, with or without
12 * modification, are permitted provided that the following conditions
14 * 1. Redistributions of source code must retain the above copyright
15 * notice, this list of conditions, and the following disclaimer,
16 * without modification.
17 * 2. Redistributions in binary form must reproduce at minimum a disclaimer
18 * substantially similar to the "NO WARRANTY" disclaimer below
19 * ("Disclaimer") and any redistribution must be conditioned upon
20 * including a substantially similar Disclaimer requirement for further
21 * binary redistribution.
22 * 3. Neither the names of the above-listed copyright holders nor the names
23 * of any contributors may be used to endorse or promote products derived
24 * from this software without specific prior written permission.
26 * Alternatively, this software may be distributed under the terms of the
27 * GNU General Public License ("GPL") version 2 as published by the Free
28 * Software Foundation.
31 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
32 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
33 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
34 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
35 * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
36 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
37 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
38 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
39 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
40 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
41 * POSSIBILITY OF SUCH DAMAGES.
53 #define _COMPONENT ACPI_CA_DEBUGGER
54 ACPI_MODULE_NAME ("dmopcode")
57 /* Local prototypes */
61 ACPI_PARSE_OBJECT *Op);
64 AcpiDmConvertToElseIf (
65 ACPI_PARSE_OBJECT *Op);
68 /*******************************************************************************
70 * FUNCTION: AcpiDmDisplayTargetPathname
72 * PARAMETERS: Op - Parse object
76 * DESCRIPTION: For AML opcodes that have a target operand, display the full
77 * pathname for the target, in a comment field. Handles Return()
80 ******************************************************************************/
83 AcpiDmDisplayTargetPathname (
84 ACPI_PARSE_OBJECT *Op)
86 ACPI_PARSE_OBJECT *NextOp;
87 ACPI_PARSE_OBJECT *PrevOp = NULL;
89 const ACPI_OPCODE_INFO *OpInfo;
92 if (Op->Common.AmlOpcode == AML_RETURN_OP)
94 PrevOp = Op->Asl.Value.Arg;
98 OpInfo = AcpiPsGetOpcodeInfo (Op->Common.AmlOpcode);
99 if (!(OpInfo->Flags & AML_HAS_TARGET))
104 /* Target is the last Op in the arg list */
106 NextOp = Op->Asl.Value.Arg;
110 NextOp = PrevOp->Asl.Next;
119 /* We must have a namepath AML opcode */
121 if (PrevOp->Asl.AmlOpcode != AML_INT_NAMEPATH_OP)
126 /* A null string is the "no target specified" case */
128 if (!PrevOp->Asl.Value.String)
133 /* No node means "unresolved external reference" */
135 if (!PrevOp->Asl.Node)
137 AcpiOsPrintf (" /* External reference */");
141 /* Ignore if path is already from the root */
143 if (*PrevOp->Asl.Value.String == '\\')
148 /* Now: we can get the full pathname */
150 Pathname = AcpiNsGetExternalPathname (PrevOp->Asl.Node);
156 AcpiOsPrintf (" /* %s */", Pathname);
157 ACPI_FREE (Pathname);
161 /*******************************************************************************
163 * FUNCTION: AcpiDmNotifyDescription
165 * PARAMETERS: Op - Name() parse object
169 * DESCRIPTION: Emit a description comment for the value associated with a
172 ******************************************************************************/
175 AcpiDmNotifyDescription (
176 ACPI_PARSE_OBJECT *Op)
178 ACPI_PARSE_OBJECT *NextOp;
179 ACPI_NAMESPACE_NODE *Node;
181 UINT8 Type = ACPI_TYPE_ANY;
184 /* The notify value is the second argument */
186 NextOp = Op->Asl.Value.Arg;
187 NextOp = NextOp->Asl.Next;
189 switch (NextOp->Common.AmlOpcode)
194 NotifyValue = (UINT8) NextOp->Common.AmlOpcode;
199 NotifyValue = (UINT8) NextOp->Asl.Value.Integer;
207 * Attempt to get the namespace node so we can determine the object type.
208 * Some notify values are dependent on the object type (Device, Thermal,
217 AcpiOsPrintf (" // %s", AcpiUtGetNotifyName (NotifyValue, Type));
221 /*******************************************************************************
223 * FUNCTION: AcpiDmPredefinedDescription
225 * PARAMETERS: Op - Name() parse object
229 * DESCRIPTION: Emit a description comment for a predefined ACPI name.
230 * Used for iASL compiler only.
232 ******************************************************************************/
235 AcpiDmPredefinedDescription (
236 ACPI_PARSE_OBJECT *Op)
238 #ifdef ACPI_ASL_COMPILER
239 const AH_PREDEFINED_NAME *Info;
250 /* Ensure that the comment field is emitted only once */
252 if (Op->Common.DisasmFlags & ACPI_PARSEOP_PREDEF_CHECKED)
256 Op->Common.DisasmFlags |= ACPI_PARSEOP_PREDEF_CHECKED;
258 /* Predefined name must start with an underscore */
260 NameString = ACPI_CAST_PTR (char, &Op->Named.Name);
261 if (NameString[0] != '_')
267 * Check for the special ACPI names:
268 * _ACd, _ALd, _EJd, _Exx, _Lxx, _Qxx, _Wxx, _T_a
269 * (where d=decimal_digit, x=hex_digit, a=anything)
271 * Convert these to the generic name for table lookup.
272 * Note: NameString is guaranteed to be upper case here.
275 (isdigit ((int) NameString[3])); /* d */
277 (isxdigit ((int) NameString[2]) && /* xx */
278 isxdigit ((int) NameString[3]));
280 switch (NameString[1])
284 if ((NameString[2] == 'C') && (LastCharIsDigit))
288 else if ((NameString[2] == 'L') && (LastCharIsDigit))
296 if ((NameString[2] == 'J') && (LastCharIsDigit))
300 else if (LastCharsAreHex)
324 if (NameString[2] == '_')
343 /* Match the name in the info table */
345 Info = AcpiAhMatchPredefinedName (NameString);
348 AcpiOsPrintf (" // %4.4s: %s",
349 NameString, ACPI_CAST_PTR (char, Info->Description));
357 /*******************************************************************************
359 * FUNCTION: AcpiDmFieldPredefinedDescription
361 * PARAMETERS: Op - Parse object
365 * DESCRIPTION: Emit a description comment for a resource descriptor tag
366 * (which is a predefined ACPI name.) Used for iASL compiler only.
368 ******************************************************************************/
371 AcpiDmFieldPredefinedDescription (
372 ACPI_PARSE_OBJECT *Op)
374 #ifdef ACPI_ASL_COMPILER
375 ACPI_PARSE_OBJECT *IndexOp;
377 const ACPI_OPCODE_INFO *OpInfo;
378 const AH_PREDEFINED_NAME *Info;
386 /* Ensure that the comment field is emitted only once */
388 if (Op->Common.DisasmFlags & ACPI_PARSEOP_PREDEF_CHECKED)
392 Op->Common.DisasmFlags |= ACPI_PARSEOP_PREDEF_CHECKED;
395 * Op must be one of the Create* operators: CreateField, CreateBitField,
396 * CreateByteField, CreateWordField, CreateDwordField, CreateQwordField
398 OpInfo = AcpiPsGetOpcodeInfo (Op->Common.AmlOpcode);
399 if (!(OpInfo->Flags & AML_CREATE))
404 /* Second argument is the Index argument */
406 IndexOp = Op->Common.Value.Arg;
407 IndexOp = IndexOp->Common.Next;
409 /* Index argument must be a namepath */
411 if (IndexOp->Common.AmlOpcode != AML_INT_NAMEPATH_OP)
416 /* Major cheat: We previously put the Tag ptr in the Node field */
418 Tag = ACPI_CAST_PTR (char, IndexOp->Common.Node);
424 /* Match the name in the info table */
426 Info = AcpiAhMatchPredefinedName (Tag);
429 AcpiOsPrintf (" // %4.4s: %s", Tag,
430 ACPI_CAST_PTR (char, Info->Description));
438 /*******************************************************************************
440 * FUNCTION: AcpiDmMethodFlags
442 * PARAMETERS: Op - Method Object to be examined
446 * DESCRIPTION: Decode control method flags
448 ******************************************************************************/
452 ACPI_PARSE_OBJECT *Op)
458 /* The next Op contains the flags */
460 Op = AcpiPsGetDepthNext (NULL, Op);
461 Flags = (UINT8) Op->Common.Value.Integer;
464 /* Mark the Op as completed */
466 Op->Common.DisasmFlags |= ACPI_PARSEOP_IGNORE;
468 /* 1) Method argument count */
470 AcpiOsPrintf (", %u, ", Args);
472 /* 2) Serialize rule */
476 AcpiOsPrintf ("Not");
479 AcpiOsPrintf ("Serialized");
485 AcpiOsPrintf (", %u", Flags >> 4);
490 /*******************************************************************************
492 * FUNCTION: AcpiDmFieldFlags
494 * PARAMETERS: Op - Field Object to be examined
498 * DESCRIPTION: Decode Field definition flags
500 ******************************************************************************/
504 ACPI_PARSE_OBJECT *Op)
509 Op = Op->Common.Next;
510 Flags = (UINT8) Op->Common.Value.Integer;
512 /* Mark the Op as completed */
514 Op->Common.DisasmFlags |= ACPI_PARSEOP_IGNORE;
516 AcpiOsPrintf ("%s, ", AcpiGbl_AccessTypes [Flags & 0x07]);
517 AcpiOsPrintf ("%s, ", AcpiGbl_LockRule [(Flags & 0x10) >> 4]);
518 AcpiOsPrintf ("%s)", AcpiGbl_UpdateRules [(Flags & 0x60) >> 5]);
522 /*******************************************************************************
524 * FUNCTION: AcpiDmAddressSpace
526 * PARAMETERS: SpaceId - ID to be translated
530 * DESCRIPTION: Decode a SpaceId to an AddressSpaceKeyword
532 ******************************************************************************/
539 if (SpaceId >= ACPI_NUM_PREDEFINED_REGIONS)
543 AcpiOsPrintf ("FFixedHW, ");
547 AcpiOsPrintf ("0x%.2X, ", SpaceId);
552 AcpiOsPrintf ("%s, ", AcpiGbl_RegionTypes [SpaceId]);
557 /*******************************************************************************
559 * FUNCTION: AcpiDmRegionFlags
561 * PARAMETERS: Op - Object to be examined
565 * DESCRIPTION: Decode OperationRegion flags
567 ******************************************************************************/
571 ACPI_PARSE_OBJECT *Op)
574 /* The next Op contains the SpaceId */
576 Op = AcpiPsGetDepthNext (NULL, Op);
578 /* Mark the Op as completed */
580 Op->Common.DisasmFlags |= ACPI_PARSEOP_IGNORE;
583 AcpiDmAddressSpace ((UINT8) Op->Common.Value.Integer);
587 /*******************************************************************************
589 * FUNCTION: AcpiDmMatchOp
591 * PARAMETERS: Op - Match Object to be examined
595 * DESCRIPTION: Decode Match opcode operands
597 ******************************************************************************/
601 ACPI_PARSE_OBJECT *Op)
603 ACPI_PARSE_OBJECT *NextOp;
606 NextOp = AcpiPsGetDepthNext (NULL, Op);
607 NextOp = NextOp->Common.Next;
611 /* Handle partial tree during single-step */
616 /* Mark the two nodes that contain the encoding for the match keywords */
618 NextOp->Common.DisasmOpcode = ACPI_DASM_MATCHOP;
620 NextOp = NextOp->Common.Next;
621 NextOp = NextOp->Common.Next;
622 NextOp->Common.DisasmOpcode = ACPI_DASM_MATCHOP;
626 /*******************************************************************************
628 * FUNCTION: AcpiDmMatchKeyword
630 * PARAMETERS: Op - Match Object to be examined
634 * DESCRIPTION: Decode Match opcode operands
636 ******************************************************************************/
640 ACPI_PARSE_OBJECT *Op)
643 if (((UINT32) Op->Common.Value.Integer) > ACPI_MAX_MATCH_OPCODE)
645 AcpiOsPrintf ("/* Unknown Match Keyword encoding */");
649 AcpiOsPrintf ("%s", ACPI_CAST_PTR (char,
650 AcpiGbl_MatchOps[(ACPI_SIZE) Op->Common.Value.Integer]));
655 /*******************************************************************************
657 * FUNCTION: AcpiDmDisassembleOneOp
659 * PARAMETERS: WalkState - Current walk info
660 * Info - Parse tree walk info
661 * Op - Op that is to be printed
665 * DESCRIPTION: Disassemble a single AML opcode
667 ******************************************************************************/
670 AcpiDmDisassembleOneOp (
671 ACPI_WALK_STATE *WalkState,
672 ACPI_OP_WALK_INFO *Info,
673 ACPI_PARSE_OBJECT *Op)
675 const ACPI_OPCODE_INFO *OpInfo = NULL;
678 ACPI_PARSE_OBJECT *Child;
681 const AH_DEVICE_ID *IdInfo;
686 AcpiOsPrintf ("<NULL OP PTR>");
690 if (Op->Common.DisasmFlags & ACPI_PARSEOP_ELSEIF)
692 return; /* ElseIf macro was already emitted */
695 switch (Op->Common.DisasmOpcode)
697 case ACPI_DASM_MATCHOP:
699 AcpiDmMatchKeyword (Op);
702 case ACPI_DASM_LNOT_SUFFIX:
704 if (!AcpiGbl_CstyleDisassembly)
706 switch (Op->Common.AmlOpcode)
709 AcpiOsPrintf ("LNotEqual");
712 case AML_LGREATER_OP:
713 AcpiOsPrintf ("LLessEqual");
717 AcpiOsPrintf ("LGreaterEqual");
725 Op->Common.DisasmOpcode = 0;
726 Op->Common.DisasmFlags |= ACPI_PARSEOP_IGNORE;
733 OpInfo = AcpiPsGetOpcodeInfo (Op->Common.AmlOpcode);
735 /* The op and arguments */
737 switch (Op->Common.AmlOpcode)
741 Child = Op->Common.Value.Arg;
742 if ((Child->Common.AmlOpcode == AML_LEQUAL_OP) ||
743 (Child->Common.AmlOpcode == AML_LGREATER_OP) ||
744 (Child->Common.AmlOpcode == AML_LLESS_OP))
746 Child->Common.DisasmOpcode = ACPI_DASM_LNOT_SUFFIX;
747 Op->Common.DisasmOpcode = ACPI_DASM_LNOT_PREFIX;
751 AcpiOsPrintf ("%s", OpInfo->Name);
757 AcpiOsPrintf ("0x%2.2X", (UINT32) Op->Common.Value.Integer);
762 if (Op->Common.DisasmOpcode == ACPI_DASM_EISAID)
764 AcpiDmDecompressEisaId ((UINT32) Op->Common.Value.Integer);
768 AcpiOsPrintf ("0x%4.4X", (UINT32) Op->Common.Value.Integer);
774 if (Op->Common.DisasmOpcode == ACPI_DASM_EISAID)
776 AcpiDmDecompressEisaId ((UINT32) Op->Common.Value.Integer);
780 AcpiOsPrintf ("0x%8.8X", (UINT32) Op->Common.Value.Integer);
786 AcpiOsPrintf ("0x%8.8X%8.8X",
787 ACPI_FORMAT_UINT64 (Op->Common.Value.Integer));
792 AcpiUtPrintString (Op->Common.Value.String, ACPI_UINT16_MAX);
794 /* For _HID/_CID strings, attempt to output a descriptive comment */
796 if (Op->Common.DisasmOpcode == ACPI_DASM_HID_STRING)
798 /* If we know about the ID, emit the description */
800 IdInfo = AcpiAhMatchHardwareId (Op->Common.Value.String);
803 AcpiOsPrintf (" /* %s */", IdInfo->Description);
810 * Determine the type of buffer. We can have one of the following:
812 * 1) ResourceTemplate containing Resource Descriptors.
813 * 2) Unicode String buffer
814 * 3) ASCII String buffer
815 * 4) Raw data buffer (if none of the above)
817 * Since there are no special AML opcodes to differentiate these
818 * types of buffers, we have to closely look at the data in the
819 * buffer to determine the type.
821 if (!AcpiGbl_NoResourceDisassembly)
823 Status = AcpiDmIsResourceTemplate (WalkState, Op);
824 if (ACPI_SUCCESS (Status))
826 Op->Common.DisasmOpcode = ACPI_DASM_RESOURCE;
827 AcpiOsPrintf ("ResourceTemplate");
830 else if (Status == AE_AML_NO_RESOURCE_END_TAG)
833 "/**** Is ResourceTemplate, "
834 "but EndTag not at buffer end ****/ ");
838 if (AcpiDmIsUuidBuffer (Op))
840 Op->Common.DisasmOpcode = ACPI_DASM_UUID;
841 AcpiOsPrintf ("ToUUID (");
843 else if (AcpiDmIsUnicodeBuffer (Op))
845 Op->Common.DisasmOpcode = ACPI_DASM_UNICODE;
846 AcpiOsPrintf ("Unicode (");
848 else if (AcpiDmIsStringBuffer (Op))
850 Op->Common.DisasmOpcode = ACPI_DASM_STRING;
851 AcpiOsPrintf ("Buffer");
853 else if (AcpiDmIsPldBuffer (Op))
855 Op->Common.DisasmOpcode = ACPI_DASM_PLD_METHOD;
856 AcpiOsPrintf ("ToPLD (");
860 Op->Common.DisasmOpcode = ACPI_DASM_BUFFER;
861 AcpiOsPrintf ("Buffer");
865 case AML_INT_NAMEPATH_OP:
867 AcpiDmNamestring (Op->Common.Value.Name);
870 case AML_INT_NAMEDFIELD_OP:
872 Length = AcpiDmDumpName (Op->Named.Name);
873 AcpiOsPrintf (",%*.s %u", (unsigned) (5 - Length), " ",
874 (UINT32) Op->Common.Value.Integer);
875 AcpiDmCommaIfFieldMember (Op);
877 Info->BitOffset += (UINT32) Op->Common.Value.Integer;
880 case AML_INT_RESERVEDFIELD_OP:
882 /* Offset() -- Must account for previous offsets */
884 Offset = (UINT32) Op->Common.Value.Integer;
885 Info->BitOffset += Offset;
887 if (Info->BitOffset % 8 == 0)
889 AcpiOsPrintf ("Offset (0x%.2X)", ACPI_DIV_8 (Info->BitOffset));
893 AcpiOsPrintf (" , %u", Offset);
896 AcpiDmCommaIfFieldMember (Op);
899 case AML_INT_ACCESSFIELD_OP:
900 case AML_INT_EXTACCESSFIELD_OP:
902 AcpiOsPrintf ("AccessAs (%s, ",
903 AcpiGbl_AccessTypes [(UINT32) (Op->Common.Value.Integer & 0x7)]);
905 AcpiDmDecodeAttribute ((UINT8) (Op->Common.Value.Integer >> 8));
907 if (Op->Common.AmlOpcode == AML_INT_EXTACCESSFIELD_OP)
909 AcpiOsPrintf (" (0x%2.2X)", (unsigned)
910 ((Op->Common.Value.Integer >> 16) & 0xFF));
914 AcpiDmCommaIfFieldMember (Op);
917 case AML_INT_CONNECTION_OP:
919 * Two types of Connection() - one with a buffer object, the
920 * other with a namestring that points to a buffer object.
922 AcpiOsPrintf ("Connection (");
923 Child = Op->Common.Value.Arg;
925 if (Child->Common.AmlOpcode == AML_INT_BYTELIST_OP)
929 Aml = Child->Named.Data;
930 Length = (UINT32) Child->Common.Value.Integer;
933 Info->MappingOp = Op;
934 Op->Common.DisasmOpcode = ACPI_DASM_RESOURCE;
936 AcpiDmResourceTemplate (Info, Op->Common.Parent, Aml, Length);
939 AcpiDmIndent (Info->Level);
943 AcpiDmNamestring (Child->Common.Value.Name);
947 AcpiDmCommaIfFieldMember (Op);
950 Op->Common.DisasmFlags |= ACPI_PARSEOP_IGNORE; /* for now, ignore in AcpiDmAscendingOp */
951 Child->Common.DisasmFlags |= ACPI_PARSEOP_IGNORE;
954 case AML_INT_BYTELIST_OP:
956 AcpiDmByteList (Info, Op);
959 case AML_INT_METHODCALL_OP:
961 Op = AcpiPsGetDepthNext (NULL, Op);
962 Op->Common.DisasmFlags |= ACPI_PARSEOP_IGNORE;
964 AcpiDmNamestring (Op->Common.Value.Name);
969 AcpiDmConvertToElseIf (Op);
972 case AML_EXTERNAL_OP:
978 /* Just get the opcode name and print it */
980 AcpiOsPrintf ("%s", OpInfo->Name);
985 if ((Op->Common.AmlOpcode == AML_INT_RETURN_VALUE_OP) &&
987 (WalkState->Results) &&
988 (WalkState->ResultCount))
990 AcpiDbDecodeInternalObject (
991 WalkState->Results->Results.ObjDesc [
992 (WalkState->ResultCount - 1) %
993 ACPI_RESULTS_FRAME_OBJ_NUM]);
1002 /*******************************************************************************
1004 * FUNCTION: AcpiDmConvertToElseIf
1006 * PARAMETERS: OriginalElseOp - ELSE Object to be examined
1008 * RETURN: None. Emits either an "Else" or an "ElseIf" ASL operator.
1010 * DESCRIPTION: Detect and convert an If..Else..If sequence to If..ElseIf
1014 * This If..Else..If nested sequence:
1028 * Is converted to this simpler If..ElseIf sequence:
1034 * ElseIf (Arg0 == 2)
1039 * NOTE: There is no actual ElseIf AML opcode. ElseIf is essentially an ASL
1040 * macro that emits an Else opcode followed by an If opcode. This function
1041 * reverses these AML sequences back to an ElseIf macro where possible. This
1042 * can make the disassembled ASL code simpler and more like the original code.
1044 ******************************************************************************/
1047 AcpiDmConvertToElseIf (
1048 ACPI_PARSE_OBJECT *OriginalElseOp)
1050 ACPI_PARSE_OBJECT *IfOp;
1051 ACPI_PARSE_OBJECT *ElseOp;
1054 /* Examine the first child of the Else */
1056 IfOp = OriginalElseOp->Common.Value.Arg;
1057 if (!IfOp || (IfOp->Common.AmlOpcode != AML_IF_OP))
1059 /* Not an Else..If sequence, cannot convert to ElseIf */
1061 AcpiOsPrintf ("%s", "Else");
1065 /* Emit ElseIf, mark the IF as now an ELSEIF */
1067 AcpiOsPrintf ("%s", "ElseIf");
1068 IfOp->Common.DisasmFlags |= ACPI_PARSEOP_ELSEIF;
1070 /* The IF parent will now be the same as the original ELSE parent */
1072 IfOp->Common.Parent = OriginalElseOp->Common.Parent;
1075 * Update the NEXT pointers to restructure the parse tree, essentially
1076 * promoting an If..Else block up to the same level as the original
1079 * Check if the IF has a corresponding ELSE peer
1081 ElseOp = IfOp->Common.Next;
1083 (ElseOp->Common.AmlOpcode == AML_ELSE_OP))
1085 /* If an ELSE matches the IF, promote it also */
1087 ElseOp->Common.Parent = OriginalElseOp->Common.Parent;
1088 ElseOp->Common.Next = OriginalElseOp->Common.Next;
1092 /* Otherwise, set the IF NEXT to the original ELSE NEXT */
1094 IfOp->Common.Next = OriginalElseOp->Common.Next;
1097 /* Detach the child IF block from the original ELSE */
1099 OriginalElseOp->Common.Value.Arg = NULL;
1101 /* Ignore the original ELSE from now on */
1103 OriginalElseOp->Common.DisasmFlags |= ACPI_PARSEOP_IGNORE;
1104 OriginalElseOp->Common.DisasmOpcode = ACPI_DASM_LNOT_PREFIX;
1106 /* Insert IF (now ELSEIF) as next peer of the original ELSE */
1108 OriginalElseOp->Common.Next = IfOp;