]>
Commit | Line | Data |
---|---|---|
f1baef62 | 1 | ;------------------------------------------------------------------------------\r |
2 | ;\r | |
bb817c56 HT |
3 | ; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>\r |
4 | ; This program and the accompanying materials\r | |
f1baef62 | 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 | |
2fc59a00 | 7 | ; http://opensource.org/licenses/bsd-license.php.\r |
f1baef62 | 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.Asm\r | |
15 | ;\r | |
16 | ; Abstract:\r | |
17 | ;\r | |
18 | ; Implementation of SetJump() on x64.\r | |
19 | ;\r | |
20 | ;------------------------------------------------------------------------------\r | |
21 | \r | |
22 | .code\r | |
23 | \r | |
ef7447bb | 24 | EXTERN InternalAssertJumpBuffer:PROC\r |
f1baef62 | 25 | \r |
26 | ;------------------------------------------------------------------------------\r | |
27 | ; UINTN\r | |
28 | ; EFIAPI\r | |
29 | ; SetJump (\r | |
30 | ; OUT BASE_LIBRARY_JUMP_BUFFER *JumpBuffer\r | |
31 | ; );\r | |
32 | ;------------------------------------------------------------------------------\r | |
33 | SetJump PROC\r | |
34 | push rcx\r | |
35 | add rsp, -20h\r | |
36 | call InternalAssertJumpBuffer\r | |
37 | add rsp, 20h\r | |
38 | pop rcx\r | |
39 | pop rdx\r | |
40 | mov [rcx], rbx\r | |
41 | mov [rcx + 8], rsp\r | |
42 | mov [rcx + 10h], rbp\r | |
43 | mov [rcx + 18h], rdi\r | |
44 | mov [rcx + 20h], rsi\r | |
45 | mov [rcx + 28h], r12\r | |
46 | mov [rcx + 30h], r13\r | |
47 | mov [rcx + 38h], r14\r | |
48 | mov [rcx + 40h], r15\r | |
49 | mov [rcx + 48h], rdx\r | |
9b9641c6 | 50 | ; save non-volatile fp registers\r |
51 | stmxcsr [rcx + 50h]\r | |
52 | movdqu [rcx + 58h], xmm6\r | |
53 | movdqu [rcx + 68h], xmm7\r | |
54 | movdqu [rcx + 78h], xmm8\r | |
55 | movdqu [rcx + 88h], xmm9\r | |
56 | movdqu [rcx + 98h], xmm10\r | |
57 | movdqu [rcx + 0A8h], xmm11\r | |
58 | movdqu [rcx + 0B8h], xmm12\r | |
59 | movdqu [rcx + 0C8h], xmm13\r | |
60 | movdqu [rcx + 0D8h], xmm14\r | |
61 | movdqu [rcx + 0E8h], xmm15\r | |
f1baef62 | 62 | xor rax, rax\r |
63 | jmp rdx\r | |
64 | SetJump ENDP\r | |
65 | \r | |
66 | END\r |