Deleted Added
full compact
exoparg6.c (85754) exoparg6.c (87031)
1
2/******************************************************************************
3 *
4 * Module Name: exoparg6 - AML execution - opcodes with 6 arguments
1
2/******************************************************************************
3 *
4 * Module Name: exoparg6 - AML execution - opcodes with 6 arguments
5 * $Revision: 4 $
5 * $Revision: 6 $
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
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 *
131/*!
132 * Naming convention for AML interpreter execution routines.
133 *
134 * The routines that begin execution of AML opcodes are named with a common
135 * convention based upon the number of arguments, the number of target operands,
136 * and whether or not a value is returned:
137 *
138 * AcpiExOpcode_xA_yT_zR
139 *
141 * Where:
140 * Where:
142 *
141 *
143 * xA - ARGUMENTS: The number of arguments (input operands) that are
142 * xA - ARGUMENTS: The number of arguments (input operands) that are
144 * required for this opcode type (1 through 6 args).
143 * required for this opcode type (1 through 6 args).
145 * yT - TARGETS: The number of targets (output operands) that are required
144 * yT - TARGETS: The number of targets (output operands) that are required
146 * for this opcode type (0, 1, or 2 targets).
145 * for this opcode type (0, 1, or 2 targets).
147 * zR - RETURN VALUE: Indicates whether this opcode type returns a value
146 * zR - RETURN VALUE: Indicates whether this opcode type returns a value
148 * as the function return (0 or 1).
149 *
147 * as the function return (0 or 1).
148 *
150 * The AcpiExOpcode* functions are called via the Dispatcher component with
149 * The AcpiExOpcode* functions are called via the Dispatcher component with
151 * fully resolved operands.
152!*/
153
154
150 * fully resolved operands.
151!*/
152
153
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 {
154/*******************************************************************************
155 *
156 * FUNCTION: AcpiExDoMatch
157 *
158 * PARAMETERS: MatchOp - The AML match operand
159 * PackageValue - Value from the target package
160 * MatchValue - Value to be matched
161 *

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

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

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

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

--- 37 unchanged lines hidden ---