2 /// Contains an implementation of longjmp for the Itanium-based architecture.
4 /// Copyright (c) 2006, Intel Corporation
5 /// All rights reserved. This program and the accompanying materials
6 /// are licensed and made available under the terms and conditions of the BSD License
7 /// which accompanies this distribution. The full text of the license may be found at
8 /// http://opensource.org/licenses/bsd-license.php
10 /// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 /// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
13 /// Module Name: longjmp.s
20 .proc InternalLongJump
21 .type InternalLongJump, @function
24 add r10 = 0x10*20 + 8*14, in0
25 movl r2 = ~((((1 << 14) - 1) << 16) | 3)
27 ld8.nt1 r14 = [r10], -8*2 // BSP, skip PFS
28 mov r15 = ar.bspstore // BSPSTORE
30 ld8.nt1 r17 = [r10], -8 // UNAT after spill
31 mov r16 = ar.rsc // RSC
34 ld8.nt1 r18 = [r10], -8 // UNAT
35 ld8.nt1 r25 = [r10], -8 // b5
38 ldf.fill.nt1 f2 = [in0], 0x10
39 ld8.nt1 r24 = [r10], -8 // b4
43 ld8.nt1 r23 = [r10], -8 // b3
46 ldf.fill.nt1 f3 = [in0], 0x10
48 (p6) br.spnt.many _skip_flushrs
51 mov r15 = ar.bsp // New BSPSTORE
54 mov r31 = ar.rnat // RNAT
57 ldf.fill.nt1 f4 = [in0], 0x10
58 ld8.nt1 r22 = [r10], -8
59 dep r2 = -1, r14, 3, 6
61 ldf.fill.nt1 f5 = [in0], 0x10
62 ld8.nt1 r21 = [r10], -8
65 ld8.nt1 r20 = [r10], -0x10 // skip sp
66 (p6) ld8.nta r31 = [r2]
69 ldf.fill.nt1 f16 = [in0], 0x10
70 ld8.fill.nt1 r7 = [r10], -8
73 ldf.fill.nt1 f17 = [in0], 0x10
74 ld8.fill.nt1 r6 = [r10], -8
77 ldf.fill.nt1 f18 = [in0], 0x10
78 ld8.fill.nt1 r5 = [r10], -8
81 ldf.fill.nt1 f19 = [in0], 0x10
82 ld8.fill.nt1 r4 = [r10], 8*13
84 ldf.fill.nt1 f20 = [in0], 0x10
85 ld8.nt1 r19 = [r10], 0x10 // PFS
87 ldf.fill.nt1 f21 = [in0], 0x10
88 ld8.nt1 r26 = [r10], 8 // Predicate
91 ldf.fill.nt1 f22 = [in0], 0x10
92 ld8.nt1 r27 = [r10], 8 // LC
95 ldf.fill.nt1 f23 = [in0], 0x10
96 ld8.nt1 r28 = [r10], -17*8 - 0x10
99 ldf.fill.nt1 f24 = [in0], 0x10
100 ldf.fill.nt1 f25 = [in0], 0x10
103 ldf.fill.nt1 f26 = [in0], 0x10
104 ldf.fill.nt1 f31 = [r10], -0x10
106 ldf.fill.nt1 f27 = [in0], 0x10
107 ldf.fill.nt1 f30 = [r10], -0x10
109 ldf.fill.nt1 f28 = [in0]
110 ldf.fill.nt1 f29 = [r10], 0x10*3 + 8*4
112 ld8.fill.nt1 sp = [r10]
115 mov ar.bspstore = r14