]> git.proxmox.com Git - mirror_edk2.git/blob - MdePkg/Library/BaseLib/X64/LongJump.asm
6ef5f964e0e5d78b1d2e093d806501ba7b2cf43c
[mirror_edk2.git] / MdePkg / Library / BaseLib / X64 / LongJump.asm
1 ;------------------------------------------------------------------------------
2 ;
3 ; Copyright (c) 2006, Intel Corporation
4 ; All rights reserved. This program and the accompanying materials
5 ; are licensed and made available under the terms and conditions of the BSD License
6 ; which accompanies this distribution. The full text of the license may be found at
7 ; http://opensource.org/licenses/bsd-license.php
8 ;
9 ; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 ; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11 ;
12 ; Module Name:
13 ;
14 ; LongJump.Asm
15 ;
16 ; Abstract:
17 ;
18 ; Implementation of _LongJump() on x64.
19 ;
20 ;------------------------------------------------------------------------------
21
22 .code
23
24 ;------------------------------------------------------------------------------
25 ; VOID
26 ; EFIAPI
27 ; InternalLongJump (
28 ; IN BASE_LIBRARY_JUMP_BUFFER *JumpBuffer,
29 ; IN UINTN Value
30 ; );
31 ;------------------------------------------------------------------------------
32 InternalLongJump PROC
33 mov rbx, [rcx]
34 mov rsp, [rcx + 8]
35 mov rbp, [rcx + 10h]
36 mov rdi, [rcx + 18h]
37 mov rsi, [rcx + 20h]
38 mov r12, [rcx + 28h]
39 mov r13, [rcx + 30h]
40 mov r14, [rcx + 38h]
41 mov r15, [rcx + 40h]
42 mov rax, rdx
43 jmp qword ptr [rcx + 48h]
44 InternalLongJump ENDP
45
46 END