Renamed interpreter stack utilities

date	99.06.29.20.02.00;	author rmoore1;	state Exp;
This commit is contained in:
aystarik 2005-06-29 17:46:47 +00:00
parent 48a83e543e
commit be46d68699
2 changed files with 34 additions and 39 deletions

View File

@ -329,24 +329,22 @@ AmlGetRvalue (
MvIndex = (*StackPtr)->Lvalue.OpCode - AML_Local0;
DEBUG_PRINT (ACPI_INFO,
("AmlGetRvalue:Lcl%d: before AmlGetMethodValue %p %p %08lx \n",
MvIndex,
StackPtr, *StackPtr, *(UINT32 *)* StackPtr));
("AmlGetRvalue:Lcl%d: before AmlMthStackGetValue %p %p %08lx \n",
MvIndex,StackPtr, *StackPtr, *(UINT32 *)* StackPtr));
Status = AmlGetMethodValue (LCLBASE + (*StackPtr)->Lvalue.OpCode - AML_Local0,
*StackPtr);
Status = AmlMthStackGetValue (LCLBASE + (*StackPtr)->Lvalue.OpCode - AML_Local0,
*StackPtr);
DEBUG_PRINT (ACPI_INFO,
("AmlGetRvalue:Lcl%d: iGMV Status=%s %p %p %08lx \n",
MvIndex, ExceptionNames[Status], StackPtr, *StackPtr,
*(UINT32 *)* StackPtr));
MvIndex, ExceptionNames[Status], StackPtr, *StackPtr,
*(UINT32 *)* StackPtr));
if (TYPE_Number == (*StackPtr)->ValType)
{
/* Value is a Number */
DEBUG_PRINT (ACPI_INFO,
("[%ld] \n", (*StackPtr)->Number.Number));
DEBUG_PRINT (ACPI_INFO, ("[%ld] \n", (*StackPtr)->Number.Number));
}
break;
@ -354,24 +352,23 @@ AmlGetRvalue (
case AML_Arg4: case AML_Arg5: case AML_Arg6:
DEBUG_PRINT (TRACE_EXEC,
("AmlGetRvalue:Arg%d: before AmlGetMethodValue %p %p %08lx \n",
MvIndex = (*StackPtr)->Lvalue.OpCode - AML_Arg0,
StackPtr, *StackPtr, *(UINT32 *)* StackPtr));
("AmlGetRvalue:Arg%d: before AmlMthStackGetValue %p %p %08lx \n",
MvIndex = (*StackPtr)->Lvalue.OpCode - AML_Arg0,
StackPtr, *StackPtr, *(UINT32 *)* StackPtr));
Status = AmlGetMethodValue (ARGBASE + (*StackPtr)->Lvalue.OpCode - AML_Arg0,
*StackPtr);
Status = AmlMthStackGetValue (ARGBASE + (*StackPtr)->Lvalue.OpCode - AML_Arg0,
*StackPtr);
DEBUG_PRINT (TRACE_EXEC,
("AmlGetRvalue:Arg%d: iGMV returned %s %p %p %08lx \n",
MvIndex, ExceptionNames[Status], StackPtr, *StackPtr,
*(UINT32 *)* StackPtr));
("AmlGetRvalue:Arg%d: iGMV returned %s %p %p %08lx \n",
MvIndex, ExceptionNames[Status], StackPtr, *StackPtr,
*(UINT32 *)* StackPtr));
if (TYPE_Number == (*StackPtr)->ValType)
{
/* Value is a Number */
DEBUG_PRINT (ACPI_INFO,
("[%ld] \n", (*StackPtr)->Number.Number));
DEBUG_PRINT (ACPI_INFO, ("[%ld] \n", (*StackPtr)->Number.Number));
}
break;
@ -465,8 +462,7 @@ AmlGetRvalue (
DEBUG_PRINT (TRACE_EXEC,
("AmlGetRvalue: found direct name ptr \n"));
DEBUG_PRINT (TRACE_EXEC, ("AmlGetRvalue: found direct name ptr \n"));
ValDesc = (ACPI_OBJECT *) NsGetValue ((ACPI_HANDLE)* StackPtr);
@ -501,18 +497,17 @@ AmlGetRvalue (
* Convert it to an object.
*/
if (AE_OK != (Status = AmlPushIfExec (MODE_Exec))) /* ObjStack */
if (AE_OK != (Status = AmlObjPushIfExec (MODE_Exec))) /* ObjStack */
{
FUNCTION_STATUS_EXIT (Status);
return Status;
}
if (AE_OK == (Status = AmlPushExec ((UINT8 *) ValDesc + 1, 0L)) && /*PkgStack*/
if (AE_OK == (Status = AmlPkgPushExec ((UINT8 *) ValDesc + 1, 0L)) && /*PkgStack*/
AE_OK == (Status = AmlDoPkg (TYPE_Package, MODE_Exec)) &&
AE_OK == (Status = AmlPopExec ())) /* PkgStack */
AE_OK == (Status = AmlPkgPopExec ())) /* PkgStack */
{
NsSetValue ((ACPI_HANDLE)* StackPtr,
ObjStack[ObjStackTop],
NsSetValue ((ACPI_HANDLE)* StackPtr, ObjStack[ObjStackTop],
(UINT8) TYPE_Package);
/* Refresh local value pointer to reflect newly set value */
@ -586,18 +581,17 @@ AmlGetRvalue (
* points to a buffer definition in the AML stream.
* Convert it to an object.
*/
if (AE_OK != (Status = AmlPushIfExec (MODE_Exec))) /* ObjStack */
if (AE_OK != (Status = AmlObjPushIfExec (MODE_Exec))) /* ObjStack */
{
FUNCTION_STATUS_EXIT (Status);
return Status;
}
if (AE_OK == (Status = AmlPushExec ((UINT8 *) ValDesc + 1, 0L)) && /*PkgStack*/
if (AE_OK == (Status = AmlPkgPushExec ((UINT8 *) ValDesc + 1, 0L)) && /*PkgStack*/
AE_OK == (Status = AmlDoPkg (TYPE_Buffer, MODE_Exec)) &&
AE_OK == (Status = AmlPopExec ())) /* PkgStack */
AE_OK == (Status = AmlPkgPopExec ())) /* PkgStack */
{
NsSetValue ((ACPI_HANDLE) *StackPtr,
ObjStack[ObjStackTop],
NsSetValue ((ACPI_HANDLE) *StackPtr, ObjStack[ObjStackTop],
(UINT8) TYPE_Buffer);
/* Refresh local value pointer to reflect newly set value */
@ -987,3 +981,4 @@ AmlGetRvalue (
}

View File

@ -158,7 +158,7 @@ AmlExecuteMethod (
for (i1 = 0; (i1 < NUMLCL) && (Status == AE_OK); ++i1)
{
Status = AmlSetMethodValue (i1 + LCLBASE, NULL, NULL);
Status = AmlMthStackSetValue (i1 + LCLBASE, NULL, NULL);
}
if (AE_OK == Status)
@ -172,13 +172,13 @@ AmlExecuteMethod (
/* parameter/argument specified */
/* define ppsParams[i2++] argument object descriptor */
Status = AmlSetMethodValue (i1 + ARGBASE, Params[i2++], NULL);
Status = AmlMthStackSetValue (i1 + ARGBASE, Params[i2++], NULL);
}
else
{
/* no parameter/argument object descriptor definition */
Status = AmlSetMethodValue (i1 + ARGBASE, NULL, NULL);
Status = AmlMthStackSetValue (i1 + ARGBASE, NULL, NULL);
}
}
}
@ -197,7 +197,7 @@ AmlExecuteMethod (
if (AE_PENDING == Status)
{
Status = AmlPopExec (); /* package stack -- inverse of AmlPrepExec() */
Status = AmlPkgPopExec (); /* package stack -- inverse of AmlPrepExec() */
}
else
@ -209,7 +209,7 @@ AmlExecuteMethod (
DEBUG_PRINT (ACPI_INFO, (" at stack level %d\n", ObjStackTop));
}
AmlPopExec (); /* package stack -- inverse of AmlPrepExec() */
AmlPkgPopExec (); /* package stack -- inverse of AmlPrepExec() */
}
MethodStackTop--; /* pop our frame off method stack */
@ -294,7 +294,7 @@ AmlExecStore (
* to protect it from garbage collection
*/
Status = AmlPushIfExec (MODE_Exec);
Status = AmlObjPushIfExec (MODE_Exec);
if (AE_OK != Status)
{
OsdFree (DestDesc);
@ -758,14 +758,14 @@ AmlExecStore (
case AML_Local0: case AML_Local1: case AML_Local2: case AML_Local3:
case AML_Local4: case AML_Local5: case AML_Local6: case AML_Local7:
Status = AmlSetMethodValue (LCLBASE + DestDesc->Lvalue.OpCode - AML_Local0, ValDesc, DestDesc);
Status = AmlMthStackSetValue (LCLBASE + DestDesc->Lvalue.OpCode - AML_Local0, ValDesc, DestDesc);
break;
case AML_Arg0: case AML_Arg1: case AML_Arg2: case AML_Arg3:
case AML_Arg4: case AML_Arg5: case AML_Arg6:
Status = AmlSetMethodValue (ARGBASE + DestDesc->Lvalue.OpCode - AML_Arg0, ValDesc, DestDesc);
Status = AmlMthStackSetValue (ARGBASE + DestDesc->Lvalue.OpCode - AML_Arg0, ValDesc, DestDesc);
break;