]> git.proxmox.com Git - mirror_edk2.git/blame - MdePkg/Library/BaseLib/Ipf/SetJmp.s
Update copyright for files modified in this year
[mirror_edk2.git] / MdePkg / Library / BaseLib / Ipf / SetJmp.s
CommitLineData
f1baef62 1/// @file\r
2/// Contains an implementation of longjmp for the Itanium-based architecture.\r
3///\r
373ade0e 4/// Copyright (c) 2006 - 2008, Intel Corporation\r
f1baef62 5/// All rights reserved. This program and the accompanying materials\r
6/// are licensed and made available under the terms and conditions of the BSD License\r
7/// which accompanies this distribution. The full text of the license may be found at\r
8/// http://opensource.org/licenses/bsd-license.php\r
9///\r
10/// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
11/// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
12///\r
13/// Module Name: longjmp.s\r
14///\r
15///\r
16\r
17.auto\r
18.text\r
19\r
20.globl InternalAssertJumpBuffer\r
21.type InternalAssertJumpBuffer, @function\r
22\r
23.proc SetJump\r
24.type SetJump, @function\r
25SetJump::\r
26 alloc loc0 = ar.pfs, 1, 2, 1, 0\r
27 mov loc1 = b0\r
28 mov out0 = in0\r
29\r
30 brl.call.sptk.many b0 = InternalAssertJumpBuffer\r
31\r
32 mov r14 = ar.unat\r
33 mov r15 = ar.bsp\r
34 add r10 = 0x10*20, in0\r
35\r
36 stf.spill.nta [in0] = f2, 0x10\r
37 st8.spill.nta [r10] = r4, 8\r
38 mov r21 = b1\r
39\r
40 stf.spill.nta [in0] = f3, 0x10\r
41 st8.spill.nta [r10] = r5, 8\r
42 mov r22 = b2\r
43\r
44 stf.spill.nta [in0] = f4, 0x10\r
45 st8.spill.nta [r10] = r6, 8\r
46 mov r23 = b3\r
47\r
48 stf.spill.nta [in0] = f5, 0x10\r
49 st8.spill.nta [r10] = r7, 8\r
50 mov r24 = b4\r
51\r
52 stf.spill.nta [in0] = f16, 0x10\r
53 st8.spill.nta [r10] = sp, 8\r
54 mov r25 = b5\r
55\r
56 stf.spill.nta [in0] = f17, 0x10\r
57 st8.nta [r10] = loc1, 8\r
58 mov r16 = pr\r
59\r
60 stf.spill.nta [in0] = f18, 0x10\r
61 st8.nta [r10] = r21, 8\r
62 mov r17 = ar.lc\r
63\r
64 stf.spill.nta [in0] = f19, 0x10\r
65 st8.nta [r10] = r22, 8\r
66\r
67 stf.spill.nta [in0] = f20, 0x10\r
68 st8.nta [r10] = r23, 8\r
69\r
70 stf.spill.nta [in0] = f21, 0x10\r
71 st8.nta [r10] = r24, 8\r
72\r
73 stf.spill.nta [in0] = f22, 0x10\r
74 st8.nta [r10] = r25, 8\r
75\r
76 stf.spill.nta [in0] = f23, 0x10\r
77 mov r18 = ar.unat\r
78\r
79 stf.spill.nta [in0] = f24, 0x10\r
80 st8.nta [r10] = r14, 8 // UNAT\r
81\r
82 stf.spill.nta [in0] = f25, 0x10\r
83 st8.nta [r10] = r18, 8 // UNAT after spill\r
84\r
85 stf.spill.nta [in0] = f26, 0x10\r
86 st8.nta [r10] = loc0, 8 // PFS\r
87\r
88 stf.spill.nta [in0] = f27, 0x10\r
89 st8.nta [r10] = r15, 8 // BSP\r
90 mov r8 = 0\r
91\r
92 stf.spill.nta [in0] = f28, 0x10\r
93 mov r19 = ar.fpsr\r
94\r
95 stf.spill.nta [in0] = f29, 0x10\r
96 st8.nta [r10] = r16, 8 // PR\r
97 mov ar.pfs = loc0\r
98\r
99 stf.spill.nta [in0] = f30, 0x10\r
100 st8.nta [r10] = r17, 8 // LC\r
101 mov b0 = loc1\r
102\r
103 stf.spill.nta [in0] = f31, 0x10\r
104 st8.nta [r10] = r19 // FPSR\r
105\r
106 mov ar.unat = r14\r
107 br.ret.sptk b0\r
108.endp SetJump\r