summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Universal/EbcDxe/X64
diff options
context:
space:
mode:
authorrsun3 <rsun3@6f19259b-4bc3-4df7-8a09-765794883524>2010-01-19 06:42:21 +0000
committerrsun3 <rsun3@6f19259b-4bc3-4df7-8a09-765794883524>2010-01-19 06:42:21 +0000
commit1ccdbf2a3e61fe9494fcd39432107ba0eb74f584 (patch)
treef8f2bcf407258369b67023955eb4374ff1a8f901 /MdeModulePkg/Universal/EbcDxe/X64
parentcd730ec08d8fc5afc557ae7f39c948998cd96bbb (diff)
downloadedk2-platforms-1ccdbf2a3e61fe9494fcd39432107ba0eb74f584.tar.xz
Improve coding style in MdeModulePkg.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9793 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Universal/EbcDxe/X64')
-rw-r--r--MdeModulePkg/Universal/EbcDxe/X64/EbcSupport.c54
1 files changed, 27 insertions, 27 deletions
diff --git a/MdeModulePkg/Universal/EbcDxe/X64/EbcSupport.c b/MdeModulePkg/Universal/EbcDxe/X64/EbcSupport.c
index ef4b4c4c0d..b737db1c3c 100644
--- a/MdeModulePkg/Universal/EbcDxe/X64/EbcSupport.c
+++ b/MdeModulePkg/Universal/EbcDxe/X64/EbcSupport.c
@@ -2,7 +2,7 @@
This module contains EBC support routines that are customized based on
the target x64 processor.
-Copyright (c) 2006 - 2008, Intel Corporation. <BR>
+Copyright (c) 2006 - 2010, Intel Corporation. <BR>
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -45,8 +45,8 @@ PushU64 (
// Advance the VM stack down, and then copy the argument to the stack.
// Hope it's aligned.
//
- VmPtr->R[0] -= sizeof (UINT64);
- *(UINT64 *) VmPtr->R[0] = Arg;
+ VmPtr->Gpr[0] -= sizeof (UINT64);
+ *(UINT64 *) VmPtr->Gpr[0] = Arg;
return;
}
@@ -140,25 +140,25 @@ EbcInterpret (
return Status;
}
VmContext.StackTop = (UINT8*)VmContext.StackPool + (STACK_REMAIN_SIZE);
- VmContext.R[0] = (UINT64) ((UINT8*)VmContext.StackPool + STACK_POOL_SIZE);
- VmContext.HighStackBottom = (UINTN) VmContext.R[0];
- VmContext.R[0] -= sizeof (UINTN);
+ VmContext.Gpr[0] = (UINT64) ((UINT8*)VmContext.StackPool + STACK_POOL_SIZE);
+ VmContext.HighStackBottom = (UINTN) VmContext.Gpr[0];
+ VmContext.Gpr[0] -= sizeof (UINTN);
//
// Align the stack on a natural boundary.
//
- VmContext.R[0] &= ~(sizeof (UINTN) - 1);
+ VmContext.Gpr[0] &= ~(sizeof (UINTN) - 1);
//
// Put a magic value in the stack gap, then adjust down again.
//
- *(UINTN *) (UINTN) (VmContext.R[0]) = (UINTN) VM_STACK_KEY_VALUE;
- VmContext.StackMagicPtr = (UINTN *) (UINTN) VmContext.R[0];
+ *(UINTN *) (UINTN) (VmContext.Gpr[0]) = (UINTN) VM_STACK_KEY_VALUE;
+ VmContext.StackMagicPtr = (UINTN *) (UINTN) VmContext.Gpr[0];
//
// The stack upper to LowStackTop is belong to the VM.
//
- VmContext.LowStackTop = (UINTN) VmContext.R[0];
+ VmContext.LowStackTop = (UINTN) VmContext.Gpr[0];
//
// For the worst case, assume there are 4 arguments passed in registers, store
@@ -191,7 +191,7 @@ EbcInterpret (
//
// For x64, this is where we say our return address is
//
- VmContext.StackRetAddr = (UINT64) VmContext.R[0];
+ VmContext.StackRetAddr = (UINT64) VmContext.Gpr[0];
//
// We need to keep track of where the EBC stack starts. This way, if the EBC
@@ -216,7 +216,7 @@ EbcInterpret (
// Return the value in R[7] unless there was an error
//
ReturnEBCStack(StackIndex);
- return (UINT64) VmContext.R[7];
+ return (UINT64) VmContext.Gpr[7];
}
@@ -280,22 +280,22 @@ ExecuteEbcImageEntryPoint (
return Status;
}
VmContext.StackTop = (UINT8*)VmContext.StackPool + (STACK_REMAIN_SIZE);
- VmContext.R[0] = (UINT64) ((UINT8*)VmContext.StackPool + STACK_POOL_SIZE);
- VmContext.HighStackBottom = (UINTN) VmContext.R[0];
- VmContext.R[0] -= sizeof (UINTN);
+ VmContext.Gpr[0] = (UINT64) ((UINT8*)VmContext.StackPool + STACK_POOL_SIZE);
+ VmContext.HighStackBottom = (UINTN) VmContext.Gpr[0];
+ VmContext.Gpr[0] -= sizeof (UINTN);
//
// Put a magic value in the stack gap, then adjust down again
//
- *(UINTN *) (UINTN) (VmContext.R[0]) = (UINTN) VM_STACK_KEY_VALUE;
- VmContext.StackMagicPtr = (UINTN *) (UINTN) VmContext.R[0];
+ *(UINTN *) (UINTN) (VmContext.Gpr[0]) = (UINTN) VM_STACK_KEY_VALUE;
+ VmContext.StackMagicPtr = (UINTN *) (UINTN) VmContext.Gpr[0];
//
// Align the stack on a natural boundary
- VmContext.R[0] &= ~(sizeof(UINTN) - 1);
+ VmContext.Gpr[0] &= ~(sizeof(UINTN) - 1);
//
- VmContext.LowStackTop = (UINTN) VmContext.R[0];
+ VmContext.LowStackTop = (UINTN) VmContext.Gpr[0];
//
// Simply copy the image handle and system table onto the EBC stack.
@@ -313,7 +313,7 @@ ExecuteEbcImageEntryPoint (
//
// For x64, this is where we say our return address is
//
- VmContext.StackRetAddr = (UINT64) VmContext.R[0];
+ VmContext.StackRetAddr = (UINT64) VmContext.Gpr[0];
//
// Entry function needn't access high stack context, simply
@@ -329,7 +329,7 @@ ExecuteEbcImageEntryPoint (
// Return the value in R[7] unless there was an error
//
ReturnEBCStack(StackIndex);
- return (UINT64) VmContext.R[7];
+ return (UINT64) VmContext.Gpr[7];
}
@@ -577,11 +577,11 @@ Action:
// put our return address and frame pointer on the VM stack.
// Then set the VM's IP to new EBC code.
//
- VmPtr->R[0] -= 8;
- VmWriteMemN (VmPtr, (UINTN) VmPtr->R[0], (UINTN) FramePtr);
- VmPtr->FramePtr = (VOID *) (UINTN) VmPtr->R[0];
- VmPtr->R[0] -= 8;
- VmWriteMem64 (VmPtr, (UINTN) VmPtr->R[0], (UINT64) (VmPtr->Ip + Size));
+ VmPtr->Gpr[0] -= 8;
+ VmWriteMemN (VmPtr, (UINTN) VmPtr->Gpr[0], (UINTN) FramePtr);
+ VmPtr->FramePtr = (VOID *) (UINTN) VmPtr->Gpr[0];
+ VmPtr->Gpr[0] -= 8;
+ VmWriteMem64 (VmPtr, (UINTN) VmPtr->Gpr[0], (UINT64) (VmPtr->Ip + Size));
VmPtr->Ip = (VMIP) (UINTN) TargetEbcAddr;
} else {
@@ -593,7 +593,7 @@ Action:
//
// Get return value and advance the IP.
//
- VmPtr->R[7] = EbcLLGetReturnValue ();
+ VmPtr->Gpr[7] = EbcLLGetReturnValue ();
VmPtr->Ip += Size;
}
}