mirror of
https://github.com/acpica/acpica/
synced 2025-02-16 05:24:36 +03:00
Fix for Ones/One/Zero opcodes
date 2002.07.23.20.44.00; author rmoore1; state Exp;
This commit is contained in:
parent
1ab3da67d3
commit
aef31caf82
@ -2,7 +2,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: aslopcode - AML opcode generation
|
||||
* $Revision: 1.43 $
|
||||
* $Revision: 1.44 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -153,6 +153,40 @@ OpcAmlOpcodeWalk (
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* FUNCTION: OpcGetIntegerWidth
|
||||
*
|
||||
* PARAMETERS: Op - DEFINITION BLOCK op
|
||||
*
|
||||
* RETURN: none
|
||||
*
|
||||
* DESCRIPTION: Extract integer width from the table revision
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
void
|
||||
OpcGetIntegerWidth (
|
||||
ACPI_PARSE_OBJECT *Op)
|
||||
{
|
||||
ACPI_PARSE_OBJECT *Child;
|
||||
|
||||
if (!Op)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
Child = Op->Asl.Child;
|
||||
Child = Child->Asl.Next;
|
||||
Child = Child->Asl.Next;
|
||||
|
||||
/* Use the revision to set the integer width */
|
||||
|
||||
AcpiUtSetIntegerWidth (Child->Asl.Value.Integer8);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* FUNCTION: OpcSetOptimalIntegerSize
|
||||
@ -186,14 +220,22 @@ OpcSetOptimalIntegerSize (
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* TBD: add check for table width (32 or 64) */
|
||||
/* Check for table integer width (32 or 64) */
|
||||
|
||||
if (Op->Asl.Value.Integer == ACPI_INTEGER_MAX)
|
||||
if (AcpiGbl_IntegerByteWidth == 4)
|
||||
{
|
||||
if (Op->Asl.Value.Integer == ACPI_UINT32_MAX)
|
||||
{
|
||||
Op->Asl.AmlOpcode = AML_ONES_OP;
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
else if (Op->Asl.Value.Integer == ACPI_INTEGER_MAX)
|
||||
{
|
||||
Op->Asl.AmlOpcode = AML_ONES_OP;
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
/* Find the best fit */
|
||||
|
||||
if (Op->Asl.Value.Integer <= ACPI_UINT8_MAX)
|
||||
|
Loading…
x
Reference in New Issue
Block a user