1 /* longjmp for PowerPC64.
2 Copyright (C) 1995, 1996, 1997, 1999, 2000, 2001, 2002, 2003, 2004, 2005
3 Free Software Foundation, Inc.
4 This file is part of the GNU C Library.
6 The GNU C Library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Lesser General Public
8 License as published by the Free Software Foundation; either
9 version 2.1 of the License, or (at your option) any later version.
11 The GNU C Library is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 Lesser General Public License for more details.
16 You should have received a copy of the GNU Lesser General Public
17 License along with the GNU C Library; if not, write to the Free
18 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
25 # include <novmxsetjmp.h>
27 # include <bits/setjmp.h>
36 .tc _rtld_global_ro[TC],_rtld_global_ro
38 .tc _dl_hwcap[TC],_dl_hwcap
44 ENTRY (BP_SYM (__longjmp))
46 CHECK_BOUNDS_BOTH_WIDE_LIT (r3, r8, r9, JB_SIZE)
48 ld r5,.LC__dl_hwcap@toc(r2)
50 /* Load _rtld-global._dl_hwcap. */
51 ld r5,RTLD_GLOBAL_RO_DL_HWCAP_OFFSET(r5)
53 ld r5,0(r5) /* Load extern _dl_hwcap. */
55 andis. r5,r5,(PPC_FEATURE_HAS_ALTIVEC >> 16)
59 lwz r0,((JB_VRSAVE)*8)(3)
61 beq+ aligned_restore_vmx
68 # define load_misaligned_vmx_lo_loaded(loadvr,lovr,shiftvr,loadgpr,addgpr) \
69 addi addgpr,addgpr,32; \
71 vperm loadvr,loadvr,lovr,shiftvr;
72 load_misaligned_vmx_lo_loaded(v21,v22,v0,r5,r6)
73 load_misaligned_vmx_lo_loaded(v22,v23,v0,r6,r5)
74 load_misaligned_vmx_lo_loaded(v23,v24,v0,r5,r6)
75 load_misaligned_vmx_lo_loaded(v24,v25,v0,r6,r5)
76 load_misaligned_vmx_lo_loaded(v25,v26,v0,r5,r6)
77 load_misaligned_vmx_lo_loaded(v26,v27,v0,r6,r5)
78 load_misaligned_vmx_lo_loaded(v27,v28,v0,r5,r6)
79 load_misaligned_vmx_lo_loaded(v28,v29,v0,r6,r5)
80 load_misaligned_vmx_lo_loaded(v29,v30,v0,r5,r6)
81 load_misaligned_vmx_lo_loaded(v30,v31,v0,r6,r5)
111 ld r1,(JB_GPR1*8)(r3)
113 PTR_DEMANGLE (r1, r25)
115 ld r2,(JB_GPR2*8)(r3)
117 ld r14,((JB_GPRS+0)*8)(r3)
118 lfd fp14,((JB_FPRS+0)*8)(r3)
119 #if defined SHARED && !defined IS_IN_rtld
120 std r2,40(r1) /* Restore the callers TOC save area. */
122 ld r15,((JB_GPRS+1)*8)(r3)
123 lfd fp15,((JB_FPRS+1)*8)(r3)
124 ld r16,((JB_GPRS+2)*8)(r3)
125 lfd fp16,((JB_FPRS+2)*8)(r3)
126 ld r17,((JB_GPRS+3)*8)(r3)
127 lfd fp17,((JB_FPRS+3)*8)(r3)
128 ld r18,((JB_GPRS+4)*8)(r3)
129 lfd fp18,((JB_FPRS+4)*8)(r3)
130 ld r19,((JB_GPRS+5)*8)(r3)
131 lfd fp19,((JB_FPRS+5)*8)(r3)
132 ld r20,((JB_GPRS+6)*8)(r3)
133 lfd fp20,((JB_FPRS+6)*8)(r3)
135 PTR_DEMANGLE2 (r0, r25)
138 /* std r2,40(r1) Restore the TOC save area. */
139 ld r21,((JB_GPRS+7)*8)(r3)
140 lfd fp21,((JB_FPRS+7)*8)(r3)
141 ld r22,((JB_GPRS+8)*8)(r3)
142 lfd fp22,((JB_FPRS+8)*8)(r3)
144 ld r23,((JB_GPRS+9)*8)(r3)
145 lfd fp23,((JB_FPRS+9)*8)(r3)
146 ld r24,((JB_GPRS+10)*8)(r3)
147 lfd fp24,((JB_FPRS+10)*8)(r3)
148 ld r25,((JB_GPRS+11)*8)(r3)
149 lfd fp25,((JB_FPRS+11)*8)(r3)
151 ld r26,((JB_GPRS+12)*8)(r3)
152 lfd fp26,((JB_FPRS+12)*8)(r3)
153 ld r27,((JB_GPRS+13)*8)(r3)
154 lfd fp27,((JB_FPRS+13)*8)(r3)
155 ld r28,((JB_GPRS+14)*8)(r3)
156 lfd fp28,((JB_FPRS+14)*8)(r3)
157 ld r29,((JB_GPRS+15)*8)(r3)
158 lfd fp29,((JB_FPRS+15)*8)(r3)
159 ld r30,((JB_GPRS+16)*8)(r3)
160 lfd fp30,((JB_FPRS+16)*8)(r3)
161 ld r31,((JB_GPRS+17)*8)(r3)
162 lfd fp31,((JB_FPRS+17)*8)(r3)
165 END (BP_SYM (__longjmp))