]>
Commit | Line | Data |
---|---|---|
f45af90b | 1 | #/** @file\r |
2 | # \r | |
3 | # Low level IA32 specific EBC support routines.\r | |
4 | # \r | |
fa97cbf4 | 5 | # Copyright (c) 2007 - 2011, Intel Corporation. All rights reserved.<BR>\r |
e5eed7d3 | 6 | # This program and the accompanying materials\r |
f45af90b | 7 | # are licensed and made available under the terms and conditions of the BSD License\r |
8 | # which accompanies this distribution. The full text of the license may be found at\r | |
9 | # http://opensource.org/licenses/bsd-license.php\r | |
10 | # \r | |
11 | # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r | |
12 | # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r | |
13 | # \r | |
7b414b4e | 14 | #**/\r |
15 | \r | |
132f41f0 | 16 | ASM_GLOBAL ASM_PFX(CopyMem)\r |
7102b199 JY |
17 | ASM_GLOBAL ASM_PFX(EbcInterpret)\r |
18 | ASM_GLOBAL ASM_PFX(ExecuteEbcImageEntryPoint)\r | |
53c71d09 | 19 | \r |
132f41f0 | 20 | ASM_GLOBAL ASM_PFX(EbcLLCALLEXNative)\r |
53c71d09 | 21 | ASM_PFX(EbcLLCALLEXNative):\r |
22 | push %ebp\r | |
23 | push %ebx\r | |
24 | mov %esp,%ebp\r | |
25 | mov 0xc(%esp),%ecx\r | |
26 | mov 0x14(%esp),%eax\r | |
27 | mov 0x10(%esp),%edx\r | |
28 | sub %edx,%eax\r | |
29 | sub %eax,%esp\r | |
30 | mov %esp,%ebx\r | |
31 | push %ecx\r | |
32 | push %eax\r | |
33 | push %edx\r | |
34 | push %ebx\r | |
35 | call ASM_PFX(CopyMem)\r | |
36 | pop %eax\r | |
37 | pop %eax\r | |
38 | pop %eax\r | |
39 | pop %ecx\r | |
40 | call *%ecx\r | |
41 | mov %ebp,%esp\r | |
42 | mov %ebp,%esp\r | |
43 | pop %ebx\r | |
44 | pop %ebp\r | |
7b414b4e | 45 | ret\r |
53c71d09 | 46 | \r |
7102b199 JY |
47 | ASM_GLOBAL ASM_PFX(EbcLLEbcInterpret)\r |
48 | ASM_PFX(EbcLLEbcInterpret):\r | |
49 | # Construct new stack\r | |
50 | push %ebp\r | |
51 | mov %esp, %ebp\r | |
52 | push %esi\r | |
53 | push %edi\r | |
54 | sub $0x40, %esp\r | |
55 | push %eax\r | |
56 | mov %ebp, %esi\r | |
57 | add $0x8, %esi\r | |
58 | mov %esp, %edi\r | |
59 | add $0x4, %edi\r | |
60 | mov $0x10, %ecx\r | |
61 | rep movsd\r | |
62 | \r | |
63 | # call C-code\r | |
64 | call ASM_PFX(EbcInterpret)\r | |
65 | add $0x44, %esp\r | |
66 | pop %edi\r | |
67 | pop %esi\r | |
68 | pop %ebp\r | |
69 | ret\r | |
70 | \r | |
71 | ASM_GLOBAL ASM_PFX(EbcLLExecuteEbcImageEntryPoint)\r | |
72 | ASM_PFX(EbcLLExecuteEbcImageEntryPoint):\r | |
73 | # Construct new stack\r | |
74 | mov %eax, -0xC(%esp)\r | |
75 | mov 0x4(%esp), %eax\r | |
76 | mov %eax, -0x8(%esp)\r | |
77 | mov 0x8(%esp), %eax\r | |
78 | mov %eax, -0x4(%esp)\r | |
79 | # call C-code\r | |
80 | sub $0xC, %esp\r | |
81 | call ASM_PFX(ExecuteEbcImageEntryPoint)\r | |
82 | add $0xC, %esp\r | |
83 | ret\r |