]> git.proxmox.com Git - mirror_edk2.git/blame - MdePkg/Library/BaseLib/X64/SetJump.S
1. Remove .extern from GCC assembly.
[mirror_edk2.git] / MdePkg / Library / BaseLib / X64 / SetJump.S
CommitLineData
b1ff428c 1#------------------------------------------------------------------------------\r
2#\r
373ade0e 3# Copyright (c) 2006 - 2008, Intel Corporation\r
b1ff428c 4# All rights reserved. This program and the accompanying materials\r
5# are licensed and made available under the terms and conditions of the BSD License\r
6# which accompanies this distribution. The full text of the license may be found at\r
7# http://opensource.org/licenses/bsd-license.php\r
8#\r
9# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
10# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
11#\r
12# Module Name:\r
13#\r
14# SetJump.S\r
15#\r
16# Abstract:\r
17#\r
18# Implementation of SetJump() on x86_64\r
19#\r
20#------------------------------------------------------------------------------\r
21\r
d5172f91 22ASM_GLOBAL ASM_PFX(SetJump)\r
b1ff428c 23ASM_PFX(SetJump):\r
24 push %rcx\r
25 add $0xffffffffffffffe0,%rsp\r
26 call ASM_PFX(InternalAssertJumpBuffer)\r
27 add $0x20,%rsp\r
28 pop %rcx\r
29 pop %rdx\r
30 mov %rbx,(%rcx)\r
31 mov %rsp,0x8(%rcx)\r
32 mov %rbp,0x10(%rcx)\r
33 mov %rdi,0x18(%rcx)\r
34 mov %rsi,0x20(%rcx)\r
35 mov %r12,0x28(%rcx)\r
36 mov %r13,0x30(%rcx)\r
37 mov %r14,0x38(%rcx)\r
38 mov %r15,0x40(%rcx)\r
39 mov %rdx,0x48(%rcx)\r
40 xor %rax,%rax\r
41 jmpq *%rdx\r