summaryrefslogtreecommitdiffstats
path: root/MdeModulePkg/Universal/EbcDxe/Ia32/EbcSupport.c
diff options
context:
space:
mode:
Diffstat (limited to 'MdeModulePkg/Universal/EbcDxe/Ia32/EbcSupport.c')
-rw-r--r--MdeModulePkg/Universal/EbcDxe/Ia32/EbcSupport.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/MdeModulePkg/Universal/EbcDxe/Ia32/EbcSupport.c b/MdeModulePkg/Universal/EbcDxe/Ia32/EbcSupport.c
index 3205d8fc8a..549b04afd2 100644
--- a/MdeModulePkg/Universal/EbcDxe/Ia32/EbcSupport.c
+++ b/MdeModulePkg/Universal/EbcDxe/Ia32/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
@@ -117,14 +117,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;
}
}
@@ -160,6 +160,7 @@ Action:
**/
UINT64
+EFIAPI
EbcInterpret (
IN OUT UINTN Arg1,
IN OUT UINTN Arg2,
@@ -308,6 +309,7 @@ EbcInterpret (
**/
UINT64
+EFIAPI
ExecuteEbcImageEntryPoint (
IN EFI_HANDLE ImageHandle,
IN EFI_SYSTEM_TABLE *SystemTable
@@ -394,6 +396,7 @@ ExecuteEbcImageEntryPoint (
//
// Return the value in R[7] unless there was an error
//
+ ReturnEBCStack(StackIndex);
return (UINT64) VmContext.Gpr[7];
}