Deleted Added
sdiff udiff text old ( 85754 ) new ( 87031 )
full compact
1
2/******************************************************************************
3 *
4 * Module Name: exoparg6 - AML execution - opcodes with 6 arguments
5 * $Revision: 4 $
6 *
7 *****************************************************************************/
8
9/******************************************************************************
10 *
11 * 1. Copyright Notice
12 *
13 * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.

--- 109 unchanged lines hidden (view full) ---

123#include "acparser.h"
124#include "amlcode.h"
125
126
127#define _COMPONENT ACPI_EXECUTER
128 MODULE_NAME ("exoparg6")
129
130
131
132/*!
133 * Naming convention for AML interpreter execution routines.
134 *
135 * The routines that begin execution of AML opcodes are named with a common
136 * convention based upon the number of arguments, the number of target operands,
137 * and whether or not a value is returned:
138 *
139 * AcpiExOpcode_xA_yT_zR
140 *
141 * Where:
142 *
143 * xA - ARGUMENTS: The number of arguments (input operands) that are
144 * required for this opcode type (1 through 6 args).
145 * yT - TARGETS: The number of targets (output operands) that are required
146 * for this opcode type (0, 1, or 2 targets).
147 * zR - RETURN VALUE: Indicates whether this opcode type returns a value
148 * as the function return (0 or 1).
149 *
150 * The AcpiExOpcode* functions are called via the Dispatcher component with
151 * fully resolved operands.
152!*/
153
154
155
156/*******************************************************************************
157 *
158 * FUNCTION: AcpiExDoMatch
159 *
160 * PARAMETERS: MatchOp - The AML match operand
161 * PackageValue - Value from the target package
162 * MatchValue - Value to be matched
163 *

--- 95 unchanged lines hidden (view full) ---

259 ACPI_OPERAND_OBJECT *ThisElement;
260
261
262 FUNCTION_TRACE_STR ("ExOpcode_6A_0T_1R", AcpiPsGetOpcodeName (WalkState->Opcode));
263
264
265 switch (WalkState->Opcode)
266 {
267 case AML_MATCH_OP:
268 /*
269 * Match (SearchPackage[0], MatchOp1[1], MatchObject1[2],
270 * MatchOp2[3], MatchObject2[4], StartIndex[5])
271 */
272
273 /* Validate match comparison sub-opcodes */
274
275 if ((Operand[1]->Integer.Value > MAX_MATCH_OPERATOR) ||
276 (Operand[3]->Integer.Value > MAX_MATCH_OPERATOR))
277 {

--- 21 unchanged lines hidden (view full) ---

299 /* Default return value if no match found */
300
301 ReturnDesc->Integer.Value = ACPI_INTEGER_MAX;
302
303 /*
304 * Examine each element until a match is found. Within the loop,
305 * "continue" signifies that the current element does not match
306 * and the next should be examined.
307 * Upon finding a match, the loop will terminate via "break" at
308 * the bottom. If it terminates "normally", MatchValue will be -1
309 * (its initial value) indicating that no match was found. When
310 * returned as a Number, this will produce the Ones value as specified.
311 */
312 for ( ; Index < Operand[0]->Package.Count; Index++)
313 {
314 ThisElement = Operand[0]->Package.Elements[Index];
315
316 /*
317 * Treat any NULL or non-numeric elements as non-matching.
318 * TBD [Unhandled] - if an element is a Name,
319 * should we examine its value?
320 */
321 if (!ThisElement ||
322 ThisElement->Common.Type != ACPI_TYPE_INTEGER)
323 {
324 continue;
325 }
326
327
328 /*
329 * Within these switch statements:
330 * "break" (exit from the switch) signifies a match;
331 * "continue" (proceed to next iteration of enclosing
332 * "for" loop) signifies a non-match.
333 */
334 if (!AcpiExDoMatch ((UINT32) Operand[1]->Integer.Value,
335 ThisElement->Integer.Value, Operand[2]->Integer.Value))
336 {
337 continue;
338 }
339
340
341 if (!AcpiExDoMatch ((UINT32) Operand[3]->Integer.Value,
342 ThisElement->Integer.Value, Operand[4]->Integer.Value))
343 {
344 continue;
345 }
346
347 /* Match found: Index is the return value */
348
349 ReturnDesc->Integer.Value = Index;

--- 37 unchanged lines hidden ---