]> git.proxmox.com Git - mirror_edk2.git/blob - MdeModulePkg/Universal/EbcDxe/Ia32/EbcLowLevel.S
8b787143b5e3354bb3eafda9a61c2f61b13866da
[mirror_edk2.git] / MdeModulePkg / Universal / EbcDxe / Ia32 / EbcLowLevel.S
1 #/** @file
2 #
3 # Low level IA32 specific EBC support routines.
4 #
5 # Copyright (c) 2007 - 2008, Intel Corporation. <BR>
6 # All rights reserved. This program and the accompanying materials
7 # are licensed and made available under the terms and conditions of the BSD License
8 # which accompanies this distribution. The full text of the license may be found at
9 # http://opensource.org/licenses/bsd-license.php
10 #
11 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
13 #
14 #**/
15
16 ASM_GLOBAL ASM_PFX(CopyMem)
17
18 ASM_GLOBAL ASM_PFX(EbcLLCALLEXNative)
19 ASM_PFX(EbcLLCALLEXNative):
20 push %ebp
21 push %ebx
22 mov %esp,%ebp
23 mov 0xc(%esp),%ecx
24 mov 0x14(%esp),%eax
25 mov 0x10(%esp),%edx
26 sub %edx,%eax
27 sub %eax,%esp
28 mov %esp,%ebx
29 push %ecx
30 push %eax
31 push %edx
32 push %ebx
33 call ASM_PFX(CopyMem)
34 pop %eax
35 pop %eax
36 pop %eax
37 pop %ecx
38 call *%ecx
39 mov %ebp,%esp
40 mov %ebp,%esp
41 pop %ebx
42 pop %ebp
43 ret
44
45 ASM_GLOBAL ASM_PFX(EbcLLGetEbcEntryPoint)
46 ASM_PFX(EbcLLGetEbcEntryPoint):
47 ret
48
49 ASM_GLOBAL ASM_PFX(EbcLLGetStackPointer)
50 ASM_PFX(EbcLLGetStackPointer):
51 mov %esp,%eax
52 add $0x4,%eax
53 ret
54
55 ASM_GLOBAL ASM_PFX(EbcLLGetReturnValue)
56 ASM_PFX(EbcLLGetReturnValue):
57 ret