]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/EbcDxe/Ia32/EbcLowLevel.S
MdeModulePkg: INF/DEC file updates to EDK II packages
[mirror_edk2.git] / MdeModulePkg / Universal / EbcDxe / Ia32 / EbcLowLevel.S
index 8b787143b5e3354bb3eafda9a61c2f61b13866da..caf8d40ffb93321eab5f06b1113cd174f6970b97 100644 (file)
@@ -2,8 +2,8 @@
 #  \r
 #    Low level IA32 specific EBC support routines.\r
 #  \r
-#  Copyright (c) 2007 - 2008, Intel Corporation. <BR>\r
-#  All rights reserved. This program and the accompanying materials\r
+#  Copyright (c) 2007 - 2011, 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
 #  http://opensource.org/licenses/bsd-license.php\r
@@ -14,6 +14,8 @@
 #**/\r
 \r
 ASM_GLOBAL ASM_PFX(CopyMem)\r
+ASM_GLOBAL ASM_PFX(EbcInterpret)\r
+ASM_GLOBAL ASM_PFX(ExecuteEbcImageEntryPoint)\r
 \r
 ASM_GLOBAL ASM_PFX(EbcLLCALLEXNative)\r
 ASM_PFX(EbcLLCALLEXNative):\r
@@ -42,16 +44,40 @@ ASM_PFX(EbcLLCALLEXNative):
          pop    %ebp\r
          ret\r
 \r
-ASM_GLOBAL ASM_PFX(EbcLLGetEbcEntryPoint)\r
-ASM_PFX(EbcLLGetEbcEntryPoint):\r
-        ret\r
+ASM_GLOBAL ASM_PFX(EbcLLEbcInterpret)\r
+ASM_PFX(EbcLLEbcInterpret):\r
+    # Construct new stack\r
+    push %ebp\r
+    mov  %esp, %ebp\r
+    push %esi\r
+    push %edi\r
+    sub  $0x40, %esp\r
+    push %eax\r
+    mov  %ebp, %esi\r
+    add  $0x8, %esi\r
+    mov  %esp, %edi\r
+    add  $0x4, %edi\r
+    mov  $0x10, %ecx\r
+    rep  movsd\r
+    \r
+    # call C-code\r
+    call ASM_PFX(EbcInterpret)\r
+    add  $0x44, %esp\r
+    pop  %edi\r
+    pop  %esi\r
+    pop  %ebp\r
+    ret\r
 \r
-ASM_GLOBAL ASM_PFX(EbcLLGetStackPointer)\r
-ASM_PFX(EbcLLGetStackPointer):\r
-        mov    %esp,%eax\r
-        add    $0x4,%eax\r
-        ret\r
-\r
-ASM_GLOBAL ASM_PFX(EbcLLGetReturnValue)\r
-ASM_PFX(EbcLLGetReturnValue):\r
-        ret\r
+ASM_GLOBAL ASM_PFX(EbcLLExecuteEbcImageEntryPoint)\r
+ASM_PFX(EbcLLExecuteEbcImageEntryPoint):\r
+    # Construct new stack\r
+    mov  %eax, -0xC(%esp)\r
+    mov  0x4(%esp), %eax\r
+    mov  %eax, -0x8(%esp)\r
+    mov  0x8(%esp), %eax\r
+    mov  %eax, -0x4(%esp)\r
+    # call C-code\r
+    sub  $0xC, %esp\r
+    call ASM_PFX(ExecuteEbcImageEntryPoint)\r
+    add  $0xC, %esp\r
+    ret\r