]> git.proxmox.com Git - mirror_edk2.git/blob - MdePkg/Library/BaseLib/Ia32/SetJump.S
Import some basic libraries instances for Mde Packages.
[mirror_edk2.git] / MdePkg / Library / BaseLib / Ia32 / SetJump.S
1 //
2 // Include common header file for this module.
3 //
4 #include "CommonHeader.h"
5
6 #------------------------------------------------------------------------------
7 #
8 # Copyright (c) 2006, Intel Corporation
9 # All rights reserved. This program and the accompanying materials
10 # are licensed and made available under the terms and conditions of the BSD License
11 # which accompanies this distribution. The full text of the license may be found at
12 # http://opensource.org/licenses/bsd-license.php
13 #
14 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
15 # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
16 #
17 # Module Name:
18 #
19 # SetJump.Asm
20 #
21 # Abstract:
22 #
23 # Implementation of SetJump() on IA-32.
24 #
25 #------------------------------------------------------------------------------
26
27 .globl ASM_PFX(SetJump), ASM_PFX(InternalAssertJumpBuffer)
28
29 #------------------------------------------------------------------------------
30 # UINTN
31 # EFIAPI
32 # SetJump (
33 # OUT BASE_LIBRARY_JUMP_BUFFER *JumpBuffer
34 # );
35 #------------------------------------------------------------------------------
36 ASM_PFX(SetJump):
37 pushl 0x4(%esp)
38 call ASM_PFX(InternalAssertJumpBuffer)
39 pop %ecx
40 pop %ecx
41 movl (%esp), %edx
42 movl %ebx, (%edx)
43 movl %esi, 4(%edx)
44 movl %edi, 8(%edx)
45 movl %ebp, 12(%edx)
46 movl %esp, 16(%edx)
47 movl %ecx, 20(%edx)
48 xorl %eax, %eax
49 jmp *%ecx