diff options
author | jyao1 <jyao1@6f19259b-4bc3-4df7-8a09-765794883524> | 2011-11-21 08:35:14 +0000 |
---|---|---|
committer | jyao1 <jyao1@6f19259b-4bc3-4df7-8a09-765794883524> | 2011-11-21 08:35:14 +0000 |
commit | fa97cbf4ef6f4fd2dc0312c09b6b5003780facb8 (patch) | |
tree | ef755da1081954d431c37d23934cd67d481fe067 /MdeModulePkg/Universal/EbcDxe/Ipf | |
parent | ea71453f72e9a1990aaf7af76689a3f69c7b603f (diff) | |
download | edk2-platforms-fa97cbf4ef6f4fd2dc0312c09b6b5003780facb8.tar.xz |
1) Fix GCC version EBC interpreter bug.
Add missing EFIPAI for EbcInterpret and ExecuteEbcImageEntryPoint().
Get return value in EbcLLCALLEXNative(), remove EbcLLGetReturnValue().
2) Fix IA32 EBC interpreter bug on MOVsnw and MOVsnd.
3) Some cleanup
Add missing ReturnEBCStack() for IA32 build.
Remove unnecessary EbcLLGetStackPointer() for X64 and IPF build.
Remove deadcode EbcLLGetStackPointer() and EbcLLGetReturnValue() in IA32/X64/IPF ASM code.
Dump more info in CommonEbcExceptionHandler().
Signed-off-by: jyao1
Reviewed-by: Elvinli
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12745 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Universal/EbcDxe/Ipf')
-rw-r--r-- | MdeModulePkg/Universal/EbcDxe/Ipf/EbcLowLevel.s | 23 | ||||
-rw-r--r-- | MdeModulePkg/Universal/EbcDxe/Ipf/EbcSupport.c | 12 |
2 files changed, 7 insertions, 28 deletions
diff --git a/MdeModulePkg/Universal/EbcDxe/Ipf/EbcLowLevel.s b/MdeModulePkg/Universal/EbcDxe/Ipf/EbcLowLevel.s index 002af6937f..4ae24dee7d 100644 --- a/MdeModulePkg/Universal/EbcDxe/Ipf/EbcLowLevel.s +++ b/MdeModulePkg/Universal/EbcDxe/Ipf/EbcLowLevel.s @@ -3,7 +3,7 @@ // Contains low level routines for the Virtual Machine implementation
// on an Itanium-based platform.
//
-// Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>
+// Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
// 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
@@ -198,27 +198,6 @@ PROCEDURE_ENTRY(EbcLLGetEbcEntryPoint) br.ret.sptk b0 ;;
PROCEDURE_EXIT(EbcLLGetEbcEntryPoint)
-//
-// INT64 EbcLLGetReturnValue(VOID)
-//
-// Description:
-// This function is called to get the value returned by native code
-// to EBC. It simply returns because the return value should still
-// be in the register, so the caller just gets the unmodified value.
-//
-PROCEDURE_ENTRY(EbcLLGetReturnValue)
- br.ret.sptk b0 ;;
-PROCEDURE_EXIT(EbcLLGetReturnValue)
-
-//
-// UINTN EbcLLGetStackPointer(VOID)
-//
-PROCEDURE_ENTRY(EbcLLGetStackPointer)
- mov r8 = r12 ;;
- br.ret.sptk b0 ;;
- br.sptk.few b6
-PROCEDURE_EXIT(EbcLLGetStackPointer)
-
diff --git a/MdeModulePkg/Universal/EbcDxe/Ipf/EbcSupport.c b/MdeModulePkg/Universal/EbcDxe/Ipf/EbcSupport.c index cf21cc7a21..1321dd4288 100644 --- a/MdeModulePkg/Universal/EbcDxe/Ipf/EbcSupport.c +++ b/MdeModulePkg/Universal/EbcDxe/Ipf/EbcSupport.c @@ -2,7 +2,7 @@ This module contains EBC support routines that are customized based on
the target processor.
-Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
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
@@ -238,6 +238,7 @@ EbcInterpret ( **/
UINT64
+EFIAPI
ExecuteEbcImageEntryPoint (
IN EFI_HANDLE ImageHandle,
IN EFI_SYSTEM_TABLE *SystemTable
@@ -277,7 +278,6 @@ ExecuteEbcImageEntryPoint ( //
// Get the stack pointer. This is the bottom of the upper stack.
//
- Addr = EbcLLGetStackPointer ();
Status = GetEBCStack(ImageHandle, &VmContext.StackPool, &StackIndex);
if (EFI_ERROR(Status)) {
@@ -865,14 +865,14 @@ Action: VmPtr->Ip = (VMIP) (UINTN) TargetEbcAddr;
} else {
//
- // The callee is not a thunk to EBC, call native code.
+ // The callee is not a thunk to EBC, call native code,
+ // and get return value.
//
- EbcLLCALLEXNative (FuncAddr, NewStackPointer, FramePtr);
+ VmPtr->Gpr[7] = EbcLLCALLEXNative (FuncAddr, NewStackPointer, FramePtr);
//
- // Get return value and advance the IP.
+ // Advance the IP.
//
- VmPtr->Gpr[7] = EbcLLGetReturnValue ();
VmPtr->Ip += Size;
}
}
|