mirror of
https://github.com/acpica/acpica/
synced 2025-02-15 13:04:16 +03:00
iASL: Fix some VarPackage issues.
1) properly handle constants like One,Ones,Zero. Do not make a var_package when these are used as a package length. 2) Allow VAR_PACKAGE (in addition to PACKAGE) opcode when validating object types for predifined names.
This commit is contained in:
parent
5e40c31ec4
commit
858f7beecf
@ -833,6 +833,7 @@ OpnDoPackage (
|
||||
|
||||
if ((PackageLengthOp->Asl.ParseOpcode == PARSEOP_INTEGER) ||
|
||||
(PackageLengthOp->Asl.ParseOpcode == PARSEOP_QWORDCONST) ||
|
||||
(PackageLengthOp->Asl.ParseOpcode == PARSEOP_ZERO) ||
|
||||
(PackageLengthOp->Asl.ParseOpcode == PARSEOP_DEFAULT_ARG))
|
||||
{
|
||||
if (!PackageLength)
|
||||
@ -850,8 +851,11 @@ OpnDoPackage (
|
||||
* If the PackageLength is a constant <= 255, we can change the
|
||||
* AML opcode from VarPackage to a simple (ACPI 1.0) Package opcode.
|
||||
*/
|
||||
if ((Op->Asl.Child->Asl.ParseOpcode == PARSEOP_INTEGER) &&
|
||||
(Op->Asl.Child->Asl.Value.Integer <= 255))
|
||||
if (((Op->Asl.Child->Asl.ParseOpcode == PARSEOP_INTEGER) &&
|
||||
(Op->Asl.Child->Asl.Value.Integer <= 255)) ||
|
||||
(Op->Asl.Child->Asl.ParseOpcode == PARSEOP_ONE) ||
|
||||
(Op->Asl.Child->Asl.ParseOpcode == PARSEOP_ONES)||
|
||||
(Op->Asl.Child->Asl.ParseOpcode == PARSEOP_ZERO))
|
||||
{
|
||||
Op->Asl.AmlOpcode = AML_PACKAGE_OP;
|
||||
Op->Asl.ParseOpcode = PARSEOP_PACKAGE;
|
||||
|
@ -730,6 +730,7 @@ ApCheckObjectType (
|
||||
break;
|
||||
|
||||
case PARSEOP_PACKAGE:
|
||||
case PARSEOP_VAR_PACKAGE:
|
||||
ReturnBtype = ACPI_RTYPE_PACKAGE;
|
||||
break;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user