1 /* Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
2 Contributed by David Mosberger-Tang <davidm@hpl.hp.com>.
4 The GNU C Library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.
9 The GNU C Library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Lesser General Public License for more details.
14 You should have received a copy of the GNU Lesser General Public
15 License along with the GNU C Library; if not, write to the Free
16 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
19 The layout of the jmp_buf is as follows. This is subject to change
20 and user-code should never depend on the particular layout of
26 0x000 stack pointer (r12) ; unchangeable (see _JMPBUF_UNWINDS)
43 0x088 ar.bsp ; unchangeable (see __longjmp.S)
45 0x098 &__jmp_buf ; address of the jmpbuf (needed to locate NaT bits in unat)
68 /* The following two entry points are the traditional entry points: */
74 alloc r8=ar.pfs,2,0,0,0
76 br.cond.sptk.many __sigsetjmp
79 /* __sigsetjmp(__jmp_buf buf, int savemask) */
83 //.prologue ASM_UNW_PRLG_RP|ASM_UNW_PRLG_PFS, ASM_UNW_PRLG_GRSAVE(2)
84 alloc loc1=ar.pfs,2,2,2,0
91 st8.spill.nta [r2]=sp,16 // r12 (sp)
92 st8.spill.nta [r3]=gp,16 // r1 (gp)
94 st8.nta [r2]=r16,16 // save caller's unat
95 st8.nta [r3]=r17,16 // save fpsr
98 st8.spill.nta [r2]=r4,16 // r4
99 st8.spill.nta [r3]=r5,16 // r5
102 stf.spill.nta [r8]=f2,32
103 stf.spill.nta [r9]=f3,32
107 stf.spill.nta [r8]=f4,32
108 stf.spill.nta [r9]=f5,32
111 stf.spill.nta [r8]=f16,32
112 stf.spill.nta [r9]=f17,32
115 stf.spill.nta [r8]=f18,32
116 stf.spill.nta [r9]=f19,32
119 stf.spill.nta [r8]=f20,32
120 stf.spill.nta [r9]=f21,32
123 stf.spill.nta [r8]=f22,32
124 stf.spill.nta [r9]=f23,32
127 stf.spill.nta [r8]=f24,32
128 stf.spill.nta [r9]=f25,32
131 stf.spill.nta [r8]=f26,32
132 stf.spill.nta [r9]=f27,32
135 stf.spill.nta [r8]=f28,32
136 stf.spill.nta [r9]=f29,32
138 stf.spill.nta [r8]=f30
139 stf.spill.nta [r9]=f31
141 st8.spill.nta [r2]=r6,16 // r6
142 st8.spill.nta [r3]=r7,16 // r7
148 st8.nta [r2]=loc0,16 // b0
149 st8.nta [r3]=r17,16 // b1
152 st8.nta [r2]=r18,16 // b2
153 st8.nta [r3]=r19,16 // b3
155 st8.nta [r2]=r20,16 // b4
156 st8.nta [r3]=r21,16 // b5
158 st8.nta [r2]=loc1,16 // ar.pfs
159 st8.nta [r3]=r22,16 // ar.lc
161 st8.nta [r2]=r24,16 // pr
162 st8.nta [r3]=r23,16 // ar.bsp
164 st8.nta [r2]=r25 // ar.unat
165 st8.nta [r3]=in0 // &__jmp_buf