]> git.proxmox.com Git - mirror_edk2.git/blob - EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/SetJump.c
Update the copyright notice format
[mirror_edk2.git] / EdkCompatibilityPkg / Foundation / Library / EdkIIGlueLib / Library / BaseLib / Ia32 / SetJump.c
1 /**
2 Implementation of SetJump() on IA-32.
3
4 Copyright (c) 2006 - 2007, Intel Corporation. All rights reserved.<BR>
5 This program and the accompanying materials
6 are licensed and made available under the terms and conditions of the BSD License
7 which accompanies this distribution. The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php
9
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
12
13 **/
14
15 #include "BaseLibInternals.h"
16
17 VOID
18 EFIAPI
19 InternalAssertJumpBuffer (
20 IN BASE_LIBRARY_JUMP_BUFFER *JumpBuffer
21 );
22
23 _declspec (naked)
24 UINTN
25 EFIAPI
26 SetJump (
27 OUT BASE_LIBRARY_JUMP_BUFFER *JumpBuffer
28 )
29 {
30 _asm {
31 push [esp + 4]
32 call InternalAssertJumpBuffer
33 pop ecx
34 pop ecx
35 mov edx, [esp]
36 mov [edx], ebx
37 mov [edx + 4], esi
38 mov [edx + 8], edi
39 mov [edx + 12], ebp
40 mov [edx + 16], esp
41 mov [edx + 20], ecx
42 xor eax, eax
43 jmp ecx
44 }
45 }
46