1 /******************************************************************************
3 * Module Name: exmisc - ACPI AML (p-code) execution - specific opcodes
5 *****************************************************************************/
7 /******************************************************************************
11 * Some or all of this work - Copyright (c) 1999 - 2015, Intel Corp.
12 * All rights reserved.
16 * 2.1. This is your license from Intel Corp. under its intellectual property
17 * rights. You may have additional license terms from the party that provided
18 * you this software, covering your right to use that party's intellectual
21 * 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a
22 * copy of the source code appearing in this file ("Covered Code") an
23 * irrevocable, perpetual, worldwide license under Intel's copyrights in the
24 * base code distributed originally by Intel ("Original Intel Code") to copy,
25 * make derivatives, distribute, use and display any portion of the Covered
26 * Code in any form, with the right to sublicense such rights; and
28 * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent
29 * license (with the right to sublicense), under only those claims of Intel
30 * patents that are infringed by the Original Intel Code, to make, use, sell,
31 * offer to sell, and import the Covered Code and derivative works thereof
32 * solely to the minimum extent necessary to exercise the above copyright
33 * license, and in no event shall the patent license extend to any additions
34 * to or modifications of the Original Intel Code. No other license or right
35 * is granted directly or by implication, estoppel or otherwise;
37 * The above copyright and patent license is granted only if the following
42 * 3.1. Redistribution of Source with Rights to Further Distribute Source.
43 * Redistribution of source code of any substantial portion of the Covered
44 * Code or modification with rights to further distribute source must include
45 * the above Copyright Notice, the above License, this list of Conditions,
46 * and the following Disclaimer and Export Compliance provision. In addition,
47 * Licensee must cause all Covered Code to which Licensee contributes to
48 * contain a file documenting the changes Licensee made to create that Covered
49 * Code and the date of any change. Licensee must include in that file the
50 * documentation of any changes made by any predecessor Licensee. Licensee
51 * must include a prominent statement that the modification is derived,
52 * directly or indirectly, from Original Intel Code.
54 * 3.2. Redistribution of Source with no Rights to Further Distribute Source.
55 * Redistribution of source code of any substantial portion of the Covered
56 * Code or modification without rights to further distribute source must
57 * include the following Disclaimer and Export Compliance provision in the
58 * documentation and/or other materials provided with distribution. In
59 * addition, Licensee may not authorize further sublicense of source of any
60 * portion of the Covered Code, and must include terms to the effect that the
61 * license from Licensee to its licensee is limited to the intellectual
62 * property embodied in the software Licensee provides to its licensee, and
63 * not to intellectual property embodied in modifications its licensee may
66 * 3.3. Redistribution of Executable. Redistribution in executable form of any
67 * substantial portion of the Covered Code or modification must reproduce the
68 * above Copyright Notice, and the following Disclaimer and Export Compliance
69 * provision in the documentation and/or other materials provided with the
72 * 3.4. Intel retains all right, title, and interest in and to the Original
75 * 3.5. Neither the name Intel nor any other trademark owned or controlled by
76 * Intel shall be used in advertising or otherwise to promote the sale, use or
77 * other dealings in products derived from or relating to the Covered Code
78 * without prior written authorization from Intel.
80 * 4. Disclaimer and Export Compliance
82 * 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED
83 * HERE. ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE
84 * IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT, ASSISTANCE,
85 * INSTALLATION, TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY
87 * UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY
88 * IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A
91 * 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES
92 * OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR
93 * COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT,
94 * SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY
95 * CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL
96 * HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES. THESE LIMITATIONS
97 * SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY
100 * 4.3. Licensee shall not export, either directly or indirectly, any of this
101 * software or system incorporating such software without first obtaining any
102 * required license or other approval from the U. S. Department of Commerce or
103 * any other agency or department of the United States Government. In the
104 * event Licensee exports any such software from the United States or
105 * re-exports any such software from a foreign destination, Licensee shall
106 * ensure that the distribution and export/re-export of the software is in
107 * compliance with all laws, regulations, orders, or other restrictions of the
108 * U.S. Export Administration Regulations. Licensee agrees that neither it nor
109 * any of its subsidiaries will export/re-export any technical data, process,
110 * software, or service, directly or indirectly, to any country for which the
111 * United States government or any agency thereof requires an export license,
112 * other governmental approval, or letter of assurance, without first obtaining
113 * such license, approval or letter.
115 *****************************************************************************/
118 #include "accommon.h"
119 #include "acinterp.h"
121 #include "amlresrc.h"
124 #define _COMPONENT ACPI_EXECUTER
125 ACPI_MODULE_NAME ("exmisc")
128 /*******************************************************************************
130 * FUNCTION: AcpiExGetObjectReference
132 * PARAMETERS: ObjDesc - Create a reference to this object
133 * ReturnDesc - Where to store the reference
134 * WalkState - Current state
138 * DESCRIPTION: Obtain and return a "reference" to the target object
139 * Common code for the RefOfOp and the CondRefOfOp.
141 ******************************************************************************/
144 AcpiExGetObjectReference (
145 ACPI_OPERAND_OBJECT
*ObjDesc
,
146 ACPI_OPERAND_OBJECT
**ReturnDesc
,
147 ACPI_WALK_STATE
*WalkState
)
149 ACPI_OPERAND_OBJECT
*ReferenceObj
;
150 ACPI_OPERAND_OBJECT
*ReferencedObj
;
153 ACPI_FUNCTION_TRACE_PTR (ExGetObjectReference
, ObjDesc
);
158 switch (ACPI_GET_DESCRIPTOR_TYPE (ObjDesc
))
160 case ACPI_DESC_TYPE_OPERAND
:
162 if (ObjDesc
->Common
.Type
!= ACPI_TYPE_LOCAL_REFERENCE
)
164 return_ACPI_STATUS (AE_AML_OPERAND_TYPE
);
168 * Must be a reference to a Local or Arg
170 switch (ObjDesc
->Reference
.Class
)
172 case ACPI_REFCLASS_LOCAL
:
173 case ACPI_REFCLASS_ARG
:
174 case ACPI_REFCLASS_DEBUG
:
176 /* The referenced object is the pseudo-node for the local/arg */
178 ReferencedObj
= ObjDesc
->Reference
.Object
;
183 ACPI_ERROR ((AE_INFO
, "Invalid Reference Class 0x%2.2X",
184 ObjDesc
->Reference
.Class
));
185 return_ACPI_STATUS (AE_AML_OPERAND_TYPE
);
189 case ACPI_DESC_TYPE_NAMED
:
191 * A named reference that has already been resolved to a Node
193 ReferencedObj
= ObjDesc
;
198 ACPI_ERROR ((AE_INFO
, "Invalid descriptor type 0x%X",
199 ACPI_GET_DESCRIPTOR_TYPE (ObjDesc
)));
200 return_ACPI_STATUS (AE_TYPE
);
204 /* Create a new reference object */
206 ReferenceObj
= AcpiUtCreateInternalObject (ACPI_TYPE_LOCAL_REFERENCE
);
209 return_ACPI_STATUS (AE_NO_MEMORY
);
212 ReferenceObj
->Reference
.Class
= ACPI_REFCLASS_REFOF
;
213 ReferenceObj
->Reference
.Object
= ReferencedObj
;
214 *ReturnDesc
= ReferenceObj
;
216 ACPI_DEBUG_PRINT ((ACPI_DB_EXEC
,
217 "Object %p Type [%s], returning Reference %p\n",
218 ObjDesc
, AcpiUtGetObjectTypeName (ObjDesc
), *ReturnDesc
));
220 return_ACPI_STATUS (AE_OK
);
224 /*******************************************************************************
226 * FUNCTION: AcpiExConcatTemplate
228 * PARAMETERS: Operand0 - First source object
229 * Operand1 - Second source object
230 * ActualReturnDesc - Where to place the return object
231 * WalkState - Current walk state
235 * DESCRIPTION: Concatenate two resource templates
237 ******************************************************************************/
240 AcpiExConcatTemplate (
241 ACPI_OPERAND_OBJECT
*Operand0
,
242 ACPI_OPERAND_OBJECT
*Operand1
,
243 ACPI_OPERAND_OBJECT
**ActualReturnDesc
,
244 ACPI_WALK_STATE
*WalkState
)
247 ACPI_OPERAND_OBJECT
*ReturnDesc
;
255 ACPI_FUNCTION_TRACE (ExConcatTemplate
);
259 * Find the EndTag descriptor in each resource template.
260 * Note1: returned pointers point TO the EndTag, not past it.
261 * Note2: zero-length buffers are allowed; treated like one EndTag
264 /* Get the length of the first resource template */
266 Status
= AcpiUtGetResourceEndTag (Operand0
, &EndTag
);
267 if (ACPI_FAILURE (Status
))
269 return_ACPI_STATUS (Status
);
272 Length0
= ACPI_PTR_DIFF (EndTag
, Operand0
->Buffer
.Pointer
);
274 /* Get the length of the second resource template */
276 Status
= AcpiUtGetResourceEndTag (Operand1
, &EndTag
);
277 if (ACPI_FAILURE (Status
))
279 return_ACPI_STATUS (Status
);
282 Length1
= ACPI_PTR_DIFF (EndTag
, Operand1
->Buffer
.Pointer
);
284 /* Combine both lengths, minimum size will be 2 for EndTag */
286 NewLength
= Length0
+ Length1
+ sizeof (AML_RESOURCE_END_TAG
);
288 /* Create a new buffer object for the result (with one EndTag) */
290 ReturnDesc
= AcpiUtCreateBufferObject (NewLength
);
293 return_ACPI_STATUS (AE_NO_MEMORY
);
297 * Copy the templates to the new buffer, 0 first, then 1 follows. One
298 * EndTag descriptor is copied from Operand1.
300 NewBuf
= ReturnDesc
->Buffer
.Pointer
;
301 memcpy (NewBuf
, Operand0
->Buffer
.Pointer
, Length0
);
302 memcpy (NewBuf
+ Length0
, Operand1
->Buffer
.Pointer
, Length1
);
304 /* Insert EndTag and set the checksum to zero, means "ignore checksum" */
306 NewBuf
[NewLength
- 1] = 0;
307 NewBuf
[NewLength
- 2] = ACPI_RESOURCE_NAME_END_TAG
| 1;
309 /* Return the completed resource template */
311 *ActualReturnDesc
= ReturnDesc
;
312 return_ACPI_STATUS (AE_OK
);
316 /*******************************************************************************
318 * FUNCTION: AcpiExDoConcatenate
320 * PARAMETERS: Operand0 - First source object
321 * Operand1 - Second source object
322 * ActualReturnDesc - Where to place the return object
323 * WalkState - Current walk state
327 * DESCRIPTION: Concatenate two objects OF THE SAME TYPE.
329 ******************************************************************************/
332 AcpiExDoConcatenate (
333 ACPI_OPERAND_OBJECT
*Operand0
,
334 ACPI_OPERAND_OBJECT
*Operand1
,
335 ACPI_OPERAND_OBJECT
**ActualReturnDesc
,
336 ACPI_WALK_STATE
*WalkState
)
338 ACPI_OPERAND_OBJECT
*LocalOperand1
= Operand1
;
339 ACPI_OPERAND_OBJECT
*ReturnDesc
;
341 const char *TypeString
;
345 ACPI_FUNCTION_TRACE (ExDoConcatenate
);
349 * Convert the second operand if necessary. The first operand
350 * determines the type of the second operand, (See the Data Types
351 * section of the ACPI specification.) Both object types are
352 * guaranteed to be either Integer/String/Buffer by the operand
353 * resolution mechanism.
355 switch (Operand0
->Common
.Type
)
357 case ACPI_TYPE_INTEGER
:
359 Status
= AcpiExConvertToInteger (Operand1
, &LocalOperand1
, 16);
362 case ACPI_TYPE_STRING
:
364 * Per the ACPI spec, Concatenate only supports int/str/buf.
365 * However, we support all objects here as an extension.
366 * This improves the usefulness of the Printf() macro.
369 switch (Operand1
->Common
.Type
)
371 case ACPI_TYPE_INTEGER
:
372 case ACPI_TYPE_STRING
:
373 case ACPI_TYPE_BUFFER
:
375 Status
= AcpiExConvertToString (
376 Operand1
, &LocalOperand1
, ACPI_IMPLICIT_CONVERT_HEX
);
381 * Just emit a string containing the object type.
383 TypeString
= AcpiUtGetTypeName (Operand1
->Common
.Type
);
385 LocalOperand1
= AcpiUtCreateStringObject (
386 ((ACPI_SIZE
) strlen (TypeString
) + 9)); /* 9 For "[Object]" */
389 Status
= AE_NO_MEMORY
;
393 strcpy (LocalOperand1
->String
.Pointer
, "[");
394 strcat (LocalOperand1
->String
.Pointer
, TypeString
);
395 strcat (LocalOperand1
->String
.Pointer
, " Object]");
401 case ACPI_TYPE_BUFFER
:
403 Status
= AcpiExConvertToBuffer (Operand1
, &LocalOperand1
);
408 ACPI_ERROR ((AE_INFO
, "Invalid object type: 0x%X",
409 Operand0
->Common
.Type
));
410 Status
= AE_AML_INTERNAL
;
413 if (ACPI_FAILURE (Status
))
419 * Both operands are now known to be the same object type
420 * (Both are Integer, String, or Buffer), and we can now perform the
425 * There are three cases to handle:
427 * 1) Two Integers concatenated to produce a new Buffer
428 * 2) Two Strings concatenated to produce a new String
429 * 3) Two Buffers concatenated to produce a new Buffer
431 switch (Operand0
->Common
.Type
)
433 case ACPI_TYPE_INTEGER
:
435 /* Result of two Integers is a Buffer */
436 /* Need enough buffer space for two integers */
438 ReturnDesc
= AcpiUtCreateBufferObject (
439 (ACPI_SIZE
) ACPI_MUL_2 (AcpiGbl_IntegerByteWidth
));
442 Status
= AE_NO_MEMORY
;
446 NewBuf
= (char *) ReturnDesc
->Buffer
.Pointer
;
448 /* Copy the first integer, LSB first */
450 memcpy (NewBuf
, &Operand0
->Integer
.Value
,
451 AcpiGbl_IntegerByteWidth
);
453 /* Copy the second integer (LSB first) after the first */
455 memcpy (NewBuf
+ AcpiGbl_IntegerByteWidth
,
456 &LocalOperand1
->Integer
.Value
, AcpiGbl_IntegerByteWidth
);
459 case ACPI_TYPE_STRING
:
461 /* Result of two Strings is a String */
463 ReturnDesc
= AcpiUtCreateStringObject (
464 ((ACPI_SIZE
) Operand0
->String
.Length
+
465 LocalOperand1
->String
.Length
));
468 Status
= AE_NO_MEMORY
;
472 NewBuf
= ReturnDesc
->String
.Pointer
;
474 /* Concatenate the strings */
476 strcpy (NewBuf
, Operand0
->String
.Pointer
);
477 strcat (NewBuf
, LocalOperand1
->String
.Pointer
);
480 case ACPI_TYPE_BUFFER
:
482 /* Result of two Buffers is a Buffer */
484 ReturnDesc
= AcpiUtCreateBufferObject (
485 ((ACPI_SIZE
) Operand0
->Buffer
.Length
+
486 LocalOperand1
->Buffer
.Length
));
489 Status
= AE_NO_MEMORY
;
493 NewBuf
= (char *) ReturnDesc
->Buffer
.Pointer
;
495 /* Concatenate the buffers */
497 memcpy (NewBuf
, Operand0
->Buffer
.Pointer
,
498 Operand0
->Buffer
.Length
);
499 memcpy (NewBuf
+ Operand0
->Buffer
.Length
,
500 LocalOperand1
->Buffer
.Pointer
,
501 LocalOperand1
->Buffer
.Length
);
506 /* Invalid object type, should not happen here */
508 ACPI_ERROR ((AE_INFO
, "Invalid object type: 0x%X",
509 Operand0
->Common
.Type
));
510 Status
=AE_AML_INTERNAL
;
514 *ActualReturnDesc
= ReturnDesc
;
517 if (LocalOperand1
!= Operand1
)
519 AcpiUtRemoveReference (LocalOperand1
);
521 return_ACPI_STATUS (Status
);
525 /*******************************************************************************
527 * FUNCTION: AcpiExDoMathOp
529 * PARAMETERS: Opcode - AML opcode
530 * Integer0 - Integer operand #0
531 * Integer1 - Integer operand #1
533 * RETURN: Integer result of the operation
535 * DESCRIPTION: Execute a math AML opcode. The purpose of having all of the
536 * math functions here is to prevent a lot of pointer dereferencing
537 * to obtain the operands.
539 ******************************************************************************/
548 ACPI_FUNCTION_ENTRY ();
553 case AML_ADD_OP
: /* Add (Integer0, Integer1, Result) */
555 return (Integer0
+ Integer1
);
557 case AML_BIT_AND_OP
: /* And (Integer0, Integer1, Result) */
559 return (Integer0
& Integer1
);
561 case AML_BIT_NAND_OP
: /* NAnd (Integer0, Integer1, Result) */
563 return (~(Integer0
& Integer1
));
565 case AML_BIT_OR_OP
: /* Or (Integer0, Integer1, Result) */
567 return (Integer0
| Integer1
);
569 case AML_BIT_NOR_OP
: /* NOr (Integer0, Integer1, Result) */
571 return (~(Integer0
| Integer1
));
573 case AML_BIT_XOR_OP
: /* XOr (Integer0, Integer1, Result) */
575 return (Integer0
^ Integer1
);
577 case AML_MULTIPLY_OP
: /* Multiply (Integer0, Integer1, Result) */
579 return (Integer0
* Integer1
);
581 case AML_SHIFT_LEFT_OP
: /* ShiftLeft (Operand, ShiftCount, Result)*/
584 * We need to check if the shiftcount is larger than the integer bit
585 * width since the behavior of this is not well-defined in the C language.
587 if (Integer1
>= AcpiGbl_IntegerBitWidth
)
591 return (Integer0
<< Integer1
);
593 case AML_SHIFT_RIGHT_OP
: /* ShiftRight (Operand, ShiftCount, Result) */
596 * We need to check if the shiftcount is larger than the integer bit
597 * width since the behavior of this is not well-defined in the C language.
599 if (Integer1
>= AcpiGbl_IntegerBitWidth
)
603 return (Integer0
>> Integer1
);
605 case AML_SUBTRACT_OP
: /* Subtract (Integer0, Integer1, Result) */
607 return (Integer0
- Integer1
);
616 /*******************************************************************************
618 * FUNCTION: AcpiExDoLogicalNumericOp
620 * PARAMETERS: Opcode - AML opcode
621 * Integer0 - Integer operand #0
622 * Integer1 - Integer operand #1
623 * LogicalResult - TRUE/FALSE result of the operation
627 * DESCRIPTION: Execute a logical "Numeric" AML opcode. For these Numeric
628 * operators (LAnd and LOr), both operands must be integers.
630 * Note: cleanest machine code seems to be produced by the code
631 * below, rather than using statements of the form:
632 * Result = (Integer0 && Integer1);
634 ******************************************************************************/
637 AcpiExDoLogicalNumericOp (
641 BOOLEAN
*LogicalResult
)
643 ACPI_STATUS Status
= AE_OK
;
644 BOOLEAN LocalResult
= FALSE
;
647 ACPI_FUNCTION_TRACE (ExDoLogicalNumericOp
);
652 case AML_LAND_OP
: /* LAnd (Integer0, Integer1) */
654 if (Integer0
&& Integer1
)
660 case AML_LOR_OP
: /* LOr (Integer0, Integer1) */
662 if (Integer0
|| Integer1
)
670 Status
= AE_AML_INTERNAL
;
674 /* Return the logical result and status */
676 *LogicalResult
= LocalResult
;
677 return_ACPI_STATUS (Status
);
681 /*******************************************************************************
683 * FUNCTION: AcpiExDoLogicalOp
685 * PARAMETERS: Opcode - AML opcode
686 * Operand0 - operand #0
687 * Operand1 - operand #1
688 * LogicalResult - TRUE/FALSE result of the operation
692 * DESCRIPTION: Execute a logical AML opcode. The purpose of having all of the
693 * functions here is to prevent a lot of pointer dereferencing
694 * to obtain the operands and to simplify the generation of the
695 * logical value. For the Numeric operators (LAnd and LOr), both
696 * operands must be integers. For the other logical operators,
697 * operands can be any combination of Integer/String/Buffer. The
698 * first operand determines the type to which the second operand
701 * Note: cleanest machine code seems to be produced by the code
702 * below, rather than using statements of the form:
703 * Result = (Operand0 == Operand1);
705 ******************************************************************************/
710 ACPI_OPERAND_OBJECT
*Operand0
,
711 ACPI_OPERAND_OBJECT
*Operand1
,
712 BOOLEAN
*LogicalResult
)
714 ACPI_OPERAND_OBJECT
*LocalOperand1
= Operand1
;
719 ACPI_STATUS Status
= AE_OK
;
720 BOOLEAN LocalResult
= FALSE
;
724 ACPI_FUNCTION_TRACE (ExDoLogicalOp
);
728 * Convert the second operand if necessary. The first operand
729 * determines the type of the second operand, (See the Data Types
730 * section of the ACPI 3.0+ specification.) Both object types are
731 * guaranteed to be either Integer/String/Buffer by the operand
732 * resolution mechanism.
734 switch (Operand0
->Common
.Type
)
736 case ACPI_TYPE_INTEGER
:
738 Status
= AcpiExConvertToInteger (Operand1
, &LocalOperand1
, 16);
741 case ACPI_TYPE_STRING
:
743 Status
= AcpiExConvertToString (
744 Operand1
, &LocalOperand1
, ACPI_IMPLICIT_CONVERT_HEX
);
747 case ACPI_TYPE_BUFFER
:
749 Status
= AcpiExConvertToBuffer (Operand1
, &LocalOperand1
);
754 Status
= AE_AML_INTERNAL
;
758 if (ACPI_FAILURE (Status
))
764 * Two cases: 1) Both Integers, 2) Both Strings or Buffers
766 if (Operand0
->Common
.Type
== ACPI_TYPE_INTEGER
)
769 * 1) Both operands are of type integer
770 * Note: LocalOperand1 may have changed above
772 Integer0
= Operand0
->Integer
.Value
;
773 Integer1
= LocalOperand1
->Integer
.Value
;
777 case AML_LEQUAL_OP
: /* LEqual (Operand0, Operand1) */
779 if (Integer0
== Integer1
)
785 case AML_LGREATER_OP
: /* LGreater (Operand0, Operand1) */
787 if (Integer0
> Integer1
)
793 case AML_LLESS_OP
: /* LLess (Operand0, Operand1) */
795 if (Integer0
< Integer1
)
803 Status
= AE_AML_INTERNAL
;
810 * 2) Both operands are Strings or both are Buffers
811 * Note: Code below takes advantage of common Buffer/String
812 * object fields. LocalOperand1 may have changed above. Use
813 * memcmp to handle nulls in buffers.
815 Length0
= Operand0
->Buffer
.Length
;
816 Length1
= LocalOperand1
->Buffer
.Length
;
818 /* Lexicographic compare: compare the data bytes */
820 Compare
= memcmp (Operand0
->Buffer
.Pointer
,
821 LocalOperand1
->Buffer
.Pointer
,
822 (Length0
> Length1
) ? Length1
: Length0
);
826 case AML_LEQUAL_OP
: /* LEqual (Operand0, Operand1) */
828 /* Length and all bytes must be equal */
830 if ((Length0
== Length1
) &&
833 /* Length and all bytes match ==> TRUE */
839 case AML_LGREATER_OP
: /* LGreater (Operand0, Operand1) */
844 goto Cleanup
; /* TRUE */
848 goto Cleanup
; /* FALSE */
851 /* Bytes match (to shortest length), compare lengths */
853 if (Length0
> Length1
)
859 case AML_LLESS_OP
: /* LLess (Operand0, Operand1) */
863 goto Cleanup
; /* FALSE */
868 goto Cleanup
; /* TRUE */
871 /* Bytes match (to shortest length), compare lengths */
873 if (Length0
< Length1
)
881 Status
= AE_AML_INTERNAL
;
888 /* New object was created if implicit conversion performed - delete */
890 if (LocalOperand1
!= Operand1
)
892 AcpiUtRemoveReference (LocalOperand1
);
895 /* Return the logical result and status */
897 *LogicalResult
= LocalResult
;
898 return_ACPI_STATUS (Status
);