# \r
# Low level IA32 specific EBC support routines.\r
# \r
-# Copyright (c) 2007 - 2008, Intel Corporation. All rights reserved.<BR>\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
#**/\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
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