]>
Commit | Line | Data |
---|---|---|
56244b92 JJ |
1 | ;------------------------------------------------------------------------------\r |
2 | ;\r | |
3 | ; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>\r | |
4 | ; 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 | ; LongJump.Asm\r | |
15 | ;\r | |
16 | ; Abstract:\r | |
17 | ;\r | |
18 | ; Implementation of _LongJump() on x64.\r | |
19 | ;\r | |
20 | ;------------------------------------------------------------------------------\r | |
21 | \r | |
22 | DEFAULT REL\r | |
23 | SECTION .text\r | |
24 | \r | |
25 | ;------------------------------------------------------------------------------\r | |
26 | ; VOID\r | |
27 | ; EFIAPI\r | |
28 | ; InternalLongJump (\r | |
29 | ; IN BASE_LIBRARY_JUMP_BUFFER *JumpBuffer,\r | |
30 | ; IN UINTN Value\r | |
31 | ; );\r | |
32 | ;------------------------------------------------------------------------------\r | |
33 | global ASM_PFX(InternalLongJump)\r | |
34 | ASM_PFX(InternalLongJump):\r | |
35 | mov rbx, [rcx]\r | |
36 | mov rsp, [rcx + 8]\r | |
37 | mov rbp, [rcx + 0x10]\r | |
38 | mov rdi, [rcx + 0x18]\r | |
39 | mov rsi, [rcx + 0x20]\r | |
40 | mov r12, [rcx + 0x28]\r | |
41 | mov r13, [rcx + 0x30]\r | |
42 | mov r14, [rcx + 0x38]\r | |
43 | mov r15, [rcx + 0x40]\r | |
44 | ; load non-volatile fp registers\r | |
45 | ldmxcsr [rcx + 0x50]\r | |
46 | movdqu xmm6, [rcx + 0x58]\r | |
47 | movdqu xmm7, [rcx + 0x68]\r | |
48 | movdqu xmm8, [rcx + 0x78]\r | |
49 | movdqu xmm9, [rcx + 0x88]\r | |
50 | movdqu xmm10, [rcx + 0x98]\r | |
51 | movdqu xmm11, [rcx + 0xA8]\r | |
52 | movdqu xmm12, [rcx + 0xB8]\r | |
53 | movdqu xmm13, [rcx + 0xC8]\r | |
54 | movdqu xmm14, [rcx + 0xD8]\r | |
55 | movdqu xmm15, [rcx + 0xE8]\r | |
56 | mov rax, rdx ; set return value\r | |
57 | jmp qword [rcx + 0x48]\r | |
58 | \r |