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