]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/EbcDxe/Ipf/EbcSupport.c
Add Missing invocations to VA_END() for VA_START().
[mirror_edk2.git] / MdeModulePkg / Universal / EbcDxe / Ipf / EbcSupport.c
index cdaae8785bae9ec412615911c28b0ae12fb03dd0..23b6c1bd84724cd6dd3f2dd9aa4b6d7ff0c49408 100644 (file)
@@ -2,7 +2,7 @@
   This module contains EBC support routines that are customized based on\r
   the target processor.\r
 \r
-Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -80,6 +80,7 @@ PushU64 (
 \r
 **/\r
 UINT64\r
+EFIAPI\r
 EbcInterpret (\r
   UINT64      Arg1,\r
   ...\r
@@ -133,6 +134,7 @@ EbcInterpret (
   Arg14     = VA_ARG (List, UINT64);\r
   Arg15     = VA_ARG (List, UINT64);\r
   Arg16     = VA_ARG (List, UINT64);\r
+  VA_END (List);\r
   //\r
   // Now clear out our context\r
   //\r
@@ -237,6 +239,7 @@ EbcInterpret (
 \r
 **/\r
 UINT64\r
+EFIAPI\r
 ExecuteEbcImageEntryPoint (\r
   IN EFI_HANDLE           ImageHandle,\r
   IN EFI_SYSTEM_TABLE     *SystemTable\r
@@ -276,7 +279,6 @@ ExecuteEbcImageEntryPoint (
   //\r
   // Get the stack pointer. This is the bottom of the upper stack.\r
   //\r
-  Addr                      = EbcLLGetStackPointer ();\r
 \r
   Status = GetEBCStack(ImageHandle, &VmContext.StackPool, &StackIndex);\r
   if (EFI_ERROR(Status)) {\r
@@ -864,14 +866,14 @@ Action:
     VmPtr->Ip = (VMIP) (UINTN) TargetEbcAddr;\r
   } else {\r
     //\r
-    // The callee is not a thunk to EBC, call native code.\r
+    // The callee is not a thunk to EBC, call native code,\r
+    // and get return value.\r
     //\r
-    EbcLLCALLEXNative (FuncAddr, NewStackPointer, FramePtr);\r
+    VmPtr->Gpr[7] = EbcLLCALLEXNative (FuncAddr, NewStackPointer, FramePtr);\r
 \r
     //\r
-    // Get return value and advance the IP.\r
+    // Advance the IP.\r
     //\r
-    VmPtr->Gpr[7] = EbcLLGetReturnValue ();\r
     VmPtr->Ip += Size;\r
   }\r
 }\r