]> pilppa.org Git - familiar-h63xx-build.git/blob - org.handhelds.familiar/packages/glibc/glibc-2.2.5/glibc-2.2.5-hhl-powerpc-fpu.patch
OE tree imported from monotone branch org.openembedded.oz354fam083 at revision 8b12e3...
[familiar-h63xx-build.git] / org.handhelds.familiar / packages / glibc / glibc-2.2.5 / glibc-2.2.5-hhl-powerpc-fpu.patch
1
2 #
3 # Patch managed by http://www.mn-logistik.de/unsupported/pxa250/patcher
4 #
5
6 --- glibc-2.2.5/sysdeps/powerpc/Dist~glibc-2.2.5-hhl-powerpc-fpu.patch  2004-09-03 19:00:33.000000000 -0500
7 +++ glibc-2.2.5/sysdeps/powerpc/Dist    2004-09-03 19:00:38.000000000 -0500
8 @@ -1,9 +1,6 @@
9  dl-machine.c
10  dl-start.S
11  ppc-mcount.S
12 -fe_nomask.c
13 -fprrest.S
14 -fprsave.S
15  gprsave1.S
16  gprsave0.S
17  gprrest1.S
18 --- glibc-2.2.5/sysdeps/powerpc/Makefile~glibc-2.2.5-hhl-powerpc-fpu.patch      2004-09-03 19:00:33.000000000 -0500
19 +++ glibc-2.2.5/sysdeps/powerpc/Makefile        2004-09-03 19:00:38.000000000 -0500
20 @@ -3,16 +3,12 @@
21  +cflags += -mnew-mnemonics -Wa,-mppc -mpowerpc
22  asm-CPPFLAGS += -Wa,-mppc
23  
24 -ifeq ($(subdir),math)
25 -libm-support += fenv_const fe_nomask
26 -endif
27 -
28  ifeq ($(subdir),gmon)
29  sysdep_routines += ppc-mcount
30  endif
31  
32  ifeq ($(subdir),misc)
33 -sysdep_routines += gprsave0 gprrest0 gprsave1 gprrest1 fprsave fprrest
34 +sysdep_routines += gprsave0 gprrest0 gprsave1 gprrest1
35  endif
36  
37  # On PPC, -fpic works until the GOT contains 2^15 bytes, and possibly
38 --- glibc-2.2.5/sysdeps/powerpc/Versions~glibc-2.2.5-hhl-powerpc-fpu.patch      2004-09-03 19:00:33.000000000 -0500
39 +++ glibc-2.2.5/sysdeps/powerpc/Versions        2004-09-03 19:00:38.000000000 -0500
40 @@ -1,8 +1,4 @@
41  libm {
42 -  GLIBC_2.1 {
43 -    # symbols used in macros from sysdeps/powerpc/bits/fenv.h
44 -    __fe_dfl_env; __fe_enabled_env; __fe_nonieee_env; __fe_nomask_env;
45 -  }
46    GLIBC_2.2 {
47      # Special functions to save and restore registers used by the
48      # runtime libraries.
49 --- glibc-2.2.5/sysdeps/powerpc/__longjmp.S~glibc-2.2.5-hhl-powerpc-fpu.patch   2004-09-03 19:00:33.000000000 -0500
50 +++ glibc-2.2.5/sysdeps/powerpc/__longjmp.S     2004-09-03 19:00:38.000000000 -0500
51 @@ -24,6 +24,8 @@
52  #include <bp-sym.h>
53  #include <bp-asm.h>
54  
55 +/* The FPU loads have been removed from this file - see fpu/__longjmp.S */
56 +
57  ENTRY (BP_SYM (__longjmp))
58         CHECK_BOUNDS_BOTH_WIDE_LIT (r3, r8, r9, JB_SIZE)
59  
60 @@ -31,44 +33,26 @@
61         lwz r2,(JB_GPR2*4)(r3)
62         lwz r0,(JB_LR*4)(r3)
63         lwz r14,((JB_GPRS+0)*4)(r3)
64 -       lfd fp14,((JB_FPRS+0*2)*4)(r3)
65         lwz r15,((JB_GPRS+1)*4)(r3)
66 -       lfd fp15,((JB_FPRS+1*2)*4)(r3)
67         lwz r16,((JB_GPRS+2)*4)(r3)
68 -       lfd fp16,((JB_FPRS+2*2)*4)(r3)
69         lwz r17,((JB_GPRS+3)*4)(r3)
70 -       lfd fp17,((JB_FPRS+3*2)*4)(r3)
71         lwz r18,((JB_GPRS+4)*4)(r3)
72 -       lfd fp18,((JB_FPRS+4*2)*4)(r3)
73         lwz r19,((JB_GPRS+5)*4)(r3)
74 -       lfd fp19,((JB_FPRS+5*2)*4)(r3)
75         lwz r20,((JB_GPRS+6)*4)(r3)
76 -       lfd fp20,((JB_FPRS+6*2)*4)(r3)
77         mtlr r0
78         lwz r21,((JB_GPRS+7)*4)(r3)
79 -       lfd fp21,((JB_FPRS+7*2)*4)(r3)
80         lwz r22,((JB_GPRS+8)*4)(r3)
81 -       lfd fp22,((JB_FPRS+8*2)*4)(r3)
82         lwz r0,(JB_CR*4)(r3)
83         lwz r23,((JB_GPRS+9)*4)(r3)
84 -       lfd fp23,((JB_FPRS+9*2)*4)(r3)
85         lwz r24,((JB_GPRS+10)*4)(r3)
86 -       lfd fp24,((JB_FPRS+10*2)*4)(r3)
87         lwz r25,((JB_GPRS+11)*4)(r3)
88 -       lfd fp25,((JB_FPRS+11*2)*4)(r3)
89         mtcrf 0xFF,r0
90         lwz r26,((JB_GPRS+12)*4)(r3)
91 -       lfd fp26,((JB_FPRS+12*2)*4)(r3)
92         lwz r27,((JB_GPRS+13)*4)(r3)
93 -       lfd fp27,((JB_FPRS+13*2)*4)(r3)
94         lwz r28,((JB_GPRS+14)*4)(r3)
95 -       lfd fp28,((JB_FPRS+14*2)*4)(r3)
96         lwz r29,((JB_GPRS+15)*4)(r3)
97 -       lfd fp29,((JB_FPRS+15*2)*4)(r3)
98         lwz r30,((JB_GPRS+16)*4)(r3)
99 -       lfd fp30,((JB_FPRS+16*2)*4)(r3)
100         lwz r31,((JB_GPRS+17)*4)(r3)
101 -       lfd fp31,((JB_FPRS+17*2)*4)(r3)
102         mr r3,r4
103         blr
104  END (BP_SYM (__longjmp))
105 --- glibc-2.2.5/sysdeps/powerpc/bits/setjmp.h~glibc-2.2.5-hhl-powerpc-fpu.patch 2004-09-03 19:00:33.000000000 -0500
106 +++ glibc-2.2.5/sysdeps/powerpc/bits/setjmp.h   2004-09-03 19:00:38.000000000 -0500
107 @@ -17,6 +17,7 @@
108     02111-1307 USA.  */
109  
110  /* Define the machine-dependent type `jmp_buf'.  PowerPC version.  */
111 +/* For processors without floating point. */
112  
113  #ifndef _SETJMP_H
114  # error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
115 @@ -33,12 +34,11 @@
116  # define JB_LR     2  /* The address we will return to */
117  # define JB_GPRS   3  /* GPRs 14 through 31 are saved, 18 in total */
118  # define JB_CR     21 /* Condition code registers. */
119 -# define JB_FPRS   22 /* FPRs 14 through 31 are saved, 18*2 words total */
120 -# define JB_SIZE   (58*4)
121 +# define JB_SIZE   (22*4)
122  #endif
123  
124  #ifndef        _ASM
125 -typedef long int __jmp_buf[58];
126 +typedef long int __jmp_buf[22];
127  #endif
128  
129  /* Test if longjmp to JMPBUF would unwind the frame
130 --- glibc-2.2.5/sysdeps/powerpc/fclrexcpt.c~glibc-2.2.5-hhl-powerpc-fpu.patch
131 +++ glibc-2.2.5/sysdeps/powerpc/fclrexcpt.c
132 -/* Clear given exceptions in current floating-point environment.
133 -   Copyright (C) 1997,99,2000,01 Free Software Foundation, Inc.
134 -   This file is part of the GNU C Library.
135 -
136 -   The GNU C Library is free software; you can redistribute it and/or
137 -   modify it under the terms of the GNU Lesser General Public
138 -   License as published by the Free Software Foundation; either
139 -   version 2.1 of the License, or (at your option) any later version.
140 -
141 -   The GNU C Library is distributed in the hope that it will be useful,
142 -   but WITHOUT ANY WARRANTY; without even the implied warranty of
143 -   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
144 -   Lesser General Public License for more details.
145 -
146 -   You should have received a copy of the GNU Lesser General Public
147 -   License along with the GNU C Library; if not, write to the Free
148 -   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
149 -   02111-1307 USA.  */
150 -
151 -#include <fenv_libc.h>
152 -
153 -#undef feclearexcept
154 -int
155 -__feclearexcept (int excepts)
156 -{
157 -  fenv_union_t u;
158 -
159 -  /* Get the current state.  */
160 -  u.fenv = fegetenv_register ();
161 -
162 -  /* Clear the relevant bits.  */
163 -  u.l[1] = u.l[1] & ~((-(excepts >> (31 - FPSCR_VX) & 1) & FE_ALL_INVALID)
164 -                     | (excepts & FPSCR_STICKY_BITS));
165 -
166 -  /* Put the new state in effect.  */
167 -  fesetenv_register (u.fenv);
168 -
169 -  /* Success.  */
170 -  return 0;
171 -}
172 -
173 -#include <shlib-compat.h>
174 -#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2)
175 -strong_alias (__feclearexcept, __old_feclearexcept)
176 -compat_symbol (libm, __old_feclearexcept, feclearexcept, GLIBC_2_1);
177 -#endif
178 -
179 -versioned_symbol (libm, __feclearexcept, feclearexcept, GLIBC_2_2);
180 --- glibc-2.2.5/sysdeps/powerpc/fe_nomask.c~glibc-2.2.5-hhl-powerpc-fpu.patch
181 +++ glibc-2.2.5/sysdeps/powerpc/fe_nomask.c
182 -/* Procedure definition for FE_NOMASK_ENV.
183 -   Copyright (C) 1997 Free Software Foundation, Inc.
184 -   This file is part of the GNU C Library.
185 -
186 -   The GNU C Library is free software; you can redistribute it and/or
187 -   modify it under the terms of the GNU Lesser General Public
188 -   License as published by the Free Software Foundation; either
189 -   version 2.1 of the License, or (at your option) any later version.
190 -
191 -   The GNU C Library is distributed in the hope that it will be useful,
192 -   but WITHOUT ANY WARRANTY; without even the implied warranty of
193 -   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
194 -   Lesser General Public License for more details.
195 -
196 -   You should have received a copy of the GNU Lesser General Public
197 -   License along with the GNU C Library; if not, write to the Free
198 -   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
199 -   02111-1307 USA.  */
200 -
201 -#include <fenv.h>
202 -#include <errno.h>
203 -
204 -/* This is presently a stub, until it's decided how the kernels should
205 -   support this.  */
206 -
207 -const fenv_t *
208 -__fe_nomask_env(void)
209 -{
210 -  __set_errno (ENOSYS);
211 -  return FE_ENABLED_ENV;
212 -}
213 -stub_warning (__fe_nomask_env)
214 --- glibc-2.2.5/sysdeps/powerpc/fprrest.S~glibc-2.2.5-hhl-powerpc-fpu.patch
215 +++ glibc-2.2.5/sysdeps/powerpc/fprrest.S
216 -/* Copyright (C) 2000, 2001 Free Software Foundation, Inc.
217 -   This file is part of the GNU C Library.
218 -
219 -   The GNU C Library is free software; you can redistribute it and/or
220 -   modify it under the terms of the GNU Lesser General Public
221 -   License as published by the Free Software Foundation; either
222 -   version 2.1 of the License, or (at your option) any later version.
223 -
224 -   The GNU C Library is distributed in the hope that it will be useful,
225 -   but WITHOUT ANY WARRANTY; without even the implied warranty of
226 -   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
227 -   Lesser General Public License for more details.
228 -
229 -   You should have received a copy of the GNU Lesser General Public
230 -   License along with the GNU C Library; if not, write to the Free
231 -   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
232 -   02111-1307 USA.  */
233 -
234 -/*
235 -    Floating Point Registers (FPRs) restore routine
236 -*/
237 -
238 -#include <sysdep.h>
239 -
240 -ENTRY(_restfpr_all)
241 -               ASM_GLOBAL_DIRECTIVE C_TEXT(_restf14)
242 -               ASM_GLOBAL_DIRECTIVE C_TEXT(_restfpr_14)
243 -C_TEXT(_restf14):
244 -C_TEXT(_restfpr_14):   lfd     fp14,-144(r1)
245 -               ASM_GLOBAL_DIRECTIVE C_TEXT(_restf15)
246 -               ASM_GLOBAL_DIRECTIVE C_TEXT(_restfpr_15)
247 -C_TEXT(_restf15):
248 -C_TEXT(_restfpr_15):   lfd     fp15,-136(r1)
249 -               ASM_GLOBAL_DIRECTIVE C_TEXT(_restf16)
250 -               ASM_GLOBAL_DIRECTIVE C_TEXT(_restfpr_16)
251 -C_TEXT(_restf16):
252 -C_TEXT(_restfpr_16):   lfd     fp16,-128(r1)
253 -               ASM_GLOBAL_DIRECTIVE C_TEXT(_restf17)
254 -               ASM_GLOBAL_DIRECTIVE C_TEXT(_restfpr_17)
255 -C_TEXT(_restf17):
256 -C_TEXT(_restfpr_17):   lfd     fp17,-120(r1)
257 -               ASM_GLOBAL_DIRECTIVE C_TEXT(_restf18)
258 -               ASM_GLOBAL_DIRECTIVE C_TEXT(_restfpr_18)
259 -C_TEXT(_restf18):
260 -C_TEXT(_restfpr_18):   lfd     fp18,-112(r1)
261 -               ASM_GLOBAL_DIRECTIVE C_TEXT(_restf19)
262 -               ASM_GLOBAL_DIRECTIVE C_TEXT(_restfpr_19)
263 -C_TEXT(_restf19):
264 -C_TEXT(_restfpr_19):   lfd     fp19,-104(r1)
265 -               ASM_GLOBAL_DIRECTIVE C_TEXT(_restf20)
266 -               ASM_GLOBAL_DIRECTIVE C_TEXT(_restfpr_20)
267 -C_TEXT(_restf20):
268 -C_TEXT(_restfpr_20):   lfd     fp20,-96(r1)
269 -               ASM_GLOBAL_DIRECTIVE C_TEXT(_restf21)
270 -               ASM_GLOBAL_DIRECTIVE C_TEXT(_restfpr_21)
271 -C_TEXT(_restf21):
272 -C_TEXT(_restfpr_21):   lfd     fp21,-88(r1)
273 -               ASM_GLOBAL_DIRECTIVE C_TEXT(_restf22)
274 -               ASM_GLOBAL_DIRECTIVE C_TEXT(_restfpr_22)
275 -C_TEXT(_restf22):
276 -C_TEXT(_restfpr_22):   lfd     fp22,-80(r1)
277 -               ASM_GLOBAL_DIRECTIVE C_TEXT(_restf23)
278 -               ASM_GLOBAL_DIRECTIVE C_TEXT(_restfpr_23)
279 -C_TEXT(_restf23):
280 -C_TEXT(_restfpr_23):   lfd     fp23,-72(r1)
281 -               ASM_GLOBAL_DIRECTIVE C_TEXT(_restf24)
282 -               ASM_GLOBAL_DIRECTIVE C_TEXT(_restfpr_24)
283 -C_TEXT(_restf24):
284 -C_TEXT(_restfpr_24):   lfd     fp24,-64(r1)
285 -               ASM_GLOBAL_DIRECTIVE C_TEXT(_restf25)
286 -               ASM_GLOBAL_DIRECTIVE C_TEXT(_restfpr_25)
287 -C_TEXT(_restf25):
288 -C_TEXT(_restfpr_25):   lfd     fp25,-56(r1)
289 -               ASM_GLOBAL_DIRECTIVE C_TEXT(_restf26)
290 -               ASM_GLOBAL_DIRECTIVE C_TEXT(_restfpr_26)
291 -C_TEXT(_restf26):
292 -C_TEXT(_restfpr_26):   lfd     fp26,-48(r1)
293 -               ASM_GLOBAL_DIRECTIVE C_TEXT(_restf27)
294 -               ASM_GLOBAL_DIRECTIVE C_TEXT(_restfpr_27)
295 -C_TEXT(_restf27):
296 -C_TEXT(_restfpr_27):   lfd     fp27,-40(r1)
297 -               ASM_GLOBAL_DIRECTIVE C_TEXT(_restf28)
298 -               ASM_GLOBAL_DIRECTIVE C_TEXT(_restfpr_28)
299 -C_TEXT(_restf28):
300 -C_TEXT(_restfpr_28):   lfd     fp28,-32(r1)
301 -               ASM_GLOBAL_DIRECTIVE C_TEXT(_restf29)
302 -               ASM_GLOBAL_DIRECTIVE C_TEXT(_restfpr_29)
303 -C_TEXT(_restf29):
304 -C_TEXT(_restfpr_29):   lwz     r0,8(r1)        #get return address from frame
305 -                       lfd     fp29,-24(r1)    #restore f29
306 -                       mtlr    r0              #move return address to LR
307 -                       lfd     fp30,-16(r1)    #restore f30
308 -                       lfd     fp31,-8(r1)     #restore f31
309 -                       blr                     #return
310 --- glibc-2.2.5/sysdeps/powerpc/fprsave.S~glibc-2.2.5-hhl-powerpc-fpu.patch
311 +++ glibc-2.2.5/sysdeps/powerpc/fprsave.S
312 -/* Copyright (C) 2000, 2001 Free Software Foundation, Inc.
313 -   This file is part of the GNU C Library.
314 -
315 -   The GNU C Library is free software; you can redistribute it and/or
316 -   modify it under the terms of the GNU Lesser General Public
317 -   License as published by the Free Software Foundation; either
318 -   version 2.1 of the License, or (at your option) any later version.
319 -
320 -   The GNU C Library is distributed in the hope that it will be useful,
321 -   but WITHOUT ANY WARRANTY; without even the implied warranty of
322 -   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
323 -   Lesser General Public License for more details.
324 -
325 -   You should have received a copy of the GNU Lesser General Public
326 -   License along with the GNU C Library; if not, write to the Free
327 -   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
328 -   02111-1307 USA.  */
329 -
330 -/*
331 -    Floating Point Registers (FPRs) save routine
332 -*/
333 -
334 -#include <sysdep.h>
335 -
336 -ENTRY(_savefpr_all)
337 -                ASM_GLOBAL_DIRECTIVE C_TEXT(_savef14)
338 -               ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_14)
339 -C_TEXT(_savef14):
340 -C_TEXT(_savefpr_14):   stfd    fp14,-144(r1)
341 -               ASM_GLOBAL_DIRECTIVE C_TEXT(_savef15)
342 -               ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_15)
343 -C_TEXT(_savef15):
344 -C_TEXT(_savefpr_15):   stfd    fp15,-136(r1)
345 -               ASM_GLOBAL_DIRECTIVE C_TEXT(_savef16)
346 -               ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_16)
347 -C_TEXT(_savef16):
348 -C_TEXT(_savefpr_16):   stfd    fp16,-128(r1)
349 -               ASM_GLOBAL_DIRECTIVE C_TEXT(_savef17)
350 -               ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_17)
351 -C_TEXT(_savef17):
352 -C_TEXT(_savefpr_17):   stfd    fp17,-120(r1)
353 -               ASM_GLOBAL_DIRECTIVE C_TEXT(_savef18)
354 -               ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_18)
355 -C_TEXT(_savef18):
356 -C_TEXT(_savefpr_18):   stfd    fp18,-112(r1)
357 -               ASM_GLOBAL_DIRECTIVE C_TEXT(_savef19)
358 -               ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_19)
359 -C_TEXT(_savef19):
360 -C_TEXT(_savefpr_19):   stfd    fp19,-104(r1)
361 -               ASM_GLOBAL_DIRECTIVE C_TEXT(_savef20)
362 -               ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_20)
363 -C_TEXT(_savef20):
364 -C_TEXT(_savefpr_20):   stfd    fp20,-96(r1)
365 -               ASM_GLOBAL_DIRECTIVE C_TEXT(_savef21)
366 -               ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_21)
367 -C_TEXT(_savef21):
368 -C_TEXT(_savefpr_21):   stfd    fp21,-88(r1)
369 -               ASM_GLOBAL_DIRECTIVE C_TEXT(_savef22)
370 -               ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_22)
371 -C_TEXT(_savef22):
372 -C_TEXT(_savefpr_22):   stfd    fp22,-80(r1)
373 -               ASM_GLOBAL_DIRECTIVE C_TEXT(_savef23)
374 -               ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_23)
375 -C_TEXT(_savef23):
376 -C_TEXT(_savefpr_23):   stfd    fp23,-72(r1)
377 -               ASM_GLOBAL_DIRECTIVE C_TEXT(_savef24)
378 -               ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_24)
379 -C_TEXT(_savef24):
380 -C_TEXT(_savefpr_24):   stfd    fp24,-64(r1)
381 -               ASM_GLOBAL_DIRECTIVE C_TEXT(_savef25)
382 -               ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_25)
383 -C_TEXT(_savef25):
384 -C_TEXT(_savefpr_25):   stfd    fp25,-56(r1)
385 -               ASM_GLOBAL_DIRECTIVE C_TEXT(_savef26)
386 -               ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_26)
387 -C_TEXT(_savef26):
388 -C_TEXT(_savefpr_26):   stfd    fp26,-48(r1)
389 -               ASM_GLOBAL_DIRECTIVE C_TEXT(_savef27)
390 -               ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_27)
391 -C_TEXT(_savef27):
392 -C_TEXT(_savefpr_27):   stfd    fp27,-40(r1)
393 -               ASM_GLOBAL_DIRECTIVE C_TEXT(_savef28)
394 -               ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_28)
395 -C_TEXT(_savef28):
396 -C_TEXT(_savefpr_28):   stfd    fp28,-32(r1)
397 -               ASM_GLOBAL_DIRECTIVE C_TEXT(_savef29)
398 -               ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_29)
399 -C_TEXT(_savef29):
400 -C_TEXT(_savefpr_29):   stfd    fp29,-24(r1)    #save f29
401 -                       stfd    fp30,-16(r1)    #save f30
402 -                       stfd    fp31,-8(r1)     #save f31
403 -                       stw     r0,8(r1)        #save LR in callers frame
404 -                       blr                     #return
405 --- glibc-2.2.5/sysdeps/powerpc/fpu/Dist~glibc-2.2.5-hhl-powerpc-fpu.patch      2004-09-03 19:00:33.000000000 -0500
406 +++ glibc-2.2.5/sysdeps/powerpc/fpu/Dist        2004-09-03 19:00:38.000000000 -0500
407 @@ -1,3 +1,6 @@
408 +fe_nomask.c
409 +fprrest.S
410 +fprsave.S
411  fenv_const.c
412  fenv_libc.h
413  t_sqrt.c
414 --- glibc-2.2.5/sysdeps/powerpc/fpu/Makefile~glibc-2.2.5-hhl-powerpc-fpu.patch  2004-09-03 19:00:33.000000000 -0500
415 +++ glibc-2.2.5/sysdeps/powerpc/fpu/Makefile    2004-09-03 19:00:38.000000000 -0500
416 @@ -1,3 +1,7 @@
417  ifeq ($(subdir),math)
418  libm-support += fenv_const fe_nomask t_sqrt
419  endif
420 +
421 +ifeq ($(subdir),misc)
422 +sysdep_routines += fprsave fprrest
423 +endif
424 --- /dev/null   2004-06-02 16:28:12.000000000 -0500
425 +++ glibc-2.2.5/sysdeps/powerpc/fpu/Versions    2004-09-03 19:00:38.000000000 -0500
426 @@ -0,0 +1,6 @@
427 +libm {
428 +  GLIBC_2.1 {
429 +    # symbols used in macros from sysdeps/powerpc/bits/fenv.h
430 +    __fe_dfl_env; __fe_enabled_env; __fe_nonieee_env; __fe_nomask_env;
431 +  }
432 +}
433 --- /dev/null   2004-06-02 16:28:12.000000000 -0500
434 +++ glibc-2.2.5/sysdeps/powerpc/fpu/__longjmp.S 2004-09-03 19:00:38.000000000 -0500
435 @@ -0,0 +1,74 @@
436 +/* longjmp for PowerPC.
437 +   Copyright (C) 1995, 1996, 1997, 1999, 2000 Free Software Foundation, Inc.
438 +   This file is part of the GNU C Library.
439 +
440 +   The GNU C Library is free software; you can redistribute it and/or
441 +   modify it under the terms of the GNU Library General Public License as
442 +   published by the Free Software Foundation; either version 2 of the
443 +   License, or (at your option) any later version.
444 +
445 +   The GNU C Library is distributed in the hope that it will be useful,
446 +   but WITHOUT ANY WARRANTY; without even the implied warranty of
447 +   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
448 +   Library General Public License for more details.
449 +
450 +   You should have received a copy of the GNU Library General Public
451 +   License along with the GNU C Library; see the file COPYING.LIB.  If not,
452 +   write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
453 +   Boston, MA 02111-1307, USA.  */
454 +
455 +#include <sysdep.h>
456 +#define _ASM
457 +#define _SETJMP_H
458 +#include <bits/setjmp.h>
459 +#include <bp-sym.h>
460 +#include <bp-asm.h>
461 +
462 +ENTRY (BP_SYM (__longjmp))
463 +       CHECK_BOUNDS_BOTH_WIDE_LIT (r3, r8, r9, JB_SIZE)
464 +
465 +       lwz r1,(JB_GPR1*4)(r3)
466 +       lwz r2,(JB_GPR2*4)(r3)
467 +       lwz r0,(JB_LR*4)(r3)
468 +       lwz r14,((JB_GPRS+0)*4)(r3)
469 +       lfd fp14,((JB_FPRS+0*2)*4)(r3)
470 +       lwz r15,((JB_GPRS+1)*4)(r3)
471 +       lfd fp15,((JB_FPRS+1*2)*4)(r3)
472 +       lwz r16,((JB_GPRS+2)*4)(r3)
473 +       lfd fp16,((JB_FPRS+2*2)*4)(r3)
474 +       lwz r17,((JB_GPRS+3)*4)(r3)
475 +       lfd fp17,((JB_FPRS+3*2)*4)(r3)
476 +       lwz r18,((JB_GPRS+4)*4)(r3)
477 +       lfd fp18,((JB_FPRS+4*2)*4)(r3)
478 +       lwz r19,((JB_GPRS+5)*4)(r3)
479 +       lfd fp19,((JB_FPRS+5*2)*4)(r3)
480 +       lwz r20,((JB_GPRS+6)*4)(r3)
481 +       lfd fp20,((JB_FPRS+6*2)*4)(r3)
482 +       mtlr r0
483 +       lwz r21,((JB_GPRS+7)*4)(r3)
484 +       lfd fp21,((JB_FPRS+7*2)*4)(r3)
485 +       lwz r22,((JB_GPRS+8)*4)(r3)
486 +       lfd fp22,((JB_FPRS+8*2)*4)(r3)
487 +       lwz r0,(JB_CR*4)(r3)
488 +       lwz r23,((JB_GPRS+9)*4)(r3)
489 +       lfd fp23,((JB_FPRS+9*2)*4)(r3)
490 +       lwz r24,((JB_GPRS+10)*4)(r3)
491 +       lfd fp24,((JB_FPRS+10*2)*4)(r3)
492 +       lwz r25,((JB_GPRS+11)*4)(r3)
493 +       lfd fp25,((JB_FPRS+11*2)*4)(r3)
494 +       mtcrf 0xFF,r0
495 +       lwz r26,((JB_GPRS+12)*4)(r3)
496 +       lfd fp26,((JB_FPRS+12*2)*4)(r3)
497 +       lwz r27,((JB_GPRS+13)*4)(r3)
498 +       lfd fp27,((JB_FPRS+13*2)*4)(r3)
499 +       lwz r28,((JB_GPRS+14)*4)(r3)
500 +       lfd fp28,((JB_FPRS+14*2)*4)(r3)
501 +       lwz r29,((JB_GPRS+15)*4)(r3)
502 +       lfd fp29,((JB_FPRS+15*2)*4)(r3)
503 +       lwz r30,((JB_GPRS+16)*4)(r3)
504 +       lfd fp30,((JB_FPRS+16*2)*4)(r3)
505 +       lwz r31,((JB_GPRS+17)*4)(r3)
506 +       lfd fp31,((JB_FPRS+17*2)*4)(r3)
507 +       mr r3,r4
508 +       blr
509 +END (BP_SYM (__longjmp))
510 --- /dev/null   2004-06-02 16:28:12.000000000 -0500
511 +++ glibc-2.2.5/sysdeps/powerpc/fpu/bits/setjmp.h       2004-09-03 19:00:38.000000000 -0500
512 @@ -0,0 +1,47 @@
513 +/* Copyright (C) 1997, 1998, 2000 Free Software Foundation, Inc.
514 +   This file is part of the GNU C Library.
515 +
516 +   The GNU C Library is free software; you can redistribute it and/or
517 +   modify it under the terms of the GNU Library General Public License as
518 +   published by the Free Software Foundation; either version 2 of the
519 +   License, or (at your option) any later version.
520 +
521 +   The GNU C Library is distributed in the hope that it will be useful,
522 +   but WITHOUT ANY WARRANTY; without even the implied warranty of
523 +   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
524 +   Library General Public License for more details.
525 +
526 +   You should have received a copy of the GNU Library General Public
527 +   License along with the GNU C Library; see the file COPYING.LIB.  If not,
528 +   write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
529 +   Boston, MA 02111-1307, USA.  */
530 +
531 +/* Define the machine-dependent type `jmp_buf'.  PowerPC version.  */
532 +
533 +#ifndef _SETJMP_H
534 +# error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
535 +#endif
536 +
537 +/* The previous bits/setjmp.h had __jmp_buf defined as a structure.
538 +   We use an array of 'long int' instead, to make writing the
539 +   assembler easier. Naturally, user code should not depend on
540 +   either representation. */
541 +
542 +#if defined __USE_MISC || defined _ASM
543 +# define JB_GPR1   0  /* Also known as the stack pointer */
544 +# define JB_GPR2   1
545 +# define JB_LR     2  /* The address we will return to */
546 +# define JB_GPRS   3  /* GPRs 14 through 31 are saved, 18 in total */
547 +# define JB_CR     21 /* Condition code registers. */
548 +# define JB_FPRS   22 /* FPRs 14 through 31 are saved, 18*2 words total */
549 +# define JB_SIZE   (58*4)
550 +#endif
551 +
552 +#ifndef        _ASM
553 +typedef long int __jmp_buf[58];
554 +#endif
555 +
556 +/* Test if longjmp to JMPBUF would unwind the frame
557 +   containing a local variable at ADDRESS.  */
558 +#define _JMPBUF_UNWINDS(jmpbuf, address) \
559 +  ((void *) (address) < (void *) (jmpbuf)[JB_GPR1])
560 --- /dev/null   2004-06-02 16:28:12.000000000 -0500
561 +++ glibc-2.2.5/sysdeps/powerpc/fpu/fclrexcpt.c 2004-09-03 19:00:38.000000000 -0500
562 @@ -0,0 +1,48 @@
563 +/* Clear given exceptions in current floating-point environment.
564 +   Copyright (C) 1997,99,2000,01 Free Software Foundation, Inc.
565 +   This file is part of the GNU C Library.
566 +
567 +   The GNU C Library is free software; you can redistribute it and/or
568 +   modify it under the terms of the GNU Lesser General Public
569 +   License as published by the Free Software Foundation; either
570 +   version 2.1 of the License, or (at your option) any later version.
571 +
572 +   The GNU C Library is distributed in the hope that it will be useful,
573 +   but WITHOUT ANY WARRANTY; without even the implied warranty of
574 +   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
575 +   Lesser General Public License for more details.
576 +
577 +   You should have received a copy of the GNU Lesser General Public
578 +   License along with the GNU C Library; if not, write to the Free
579 +   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
580 +   02111-1307 USA.  */
581 +
582 +#include <fenv_libc.h>
583 +
584 +#undef feclearexcept
585 +int
586 +__feclearexcept (int excepts)
587 +{
588 +  fenv_union_t u;
589 +
590 +  /* Get the current state.  */
591 +  u.fenv = fegetenv_register ();
592 +
593 +  /* Clear the relevant bits.  */
594 +  u.l[1] = u.l[1] & ~((-(excepts >> (31 - FPSCR_VX) & 1) & FE_ALL_INVALID)
595 +                     | (excepts & FPSCR_STICKY_BITS));
596 +
597 +  /* Put the new state in effect.  */
598 +  fesetenv_register (u.fenv);
599 +
600 +  /* Success.  */
601 +  return 0;
602 +}
603 +
604 +#include <shlib-compat.h>
605 +#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2)
606 +strong_alias (__feclearexcept, __old_feclearexcept)
607 +compat_symbol (libm, __old_feclearexcept, feclearexcept, GLIBC_2_1);
608 +#endif
609 +
610 +versioned_symbol (libm, __feclearexcept, feclearexcept, GLIBC_2_2);
611 --- /dev/null   2004-06-02 16:28:12.000000000 -0500
612 +++ glibc-2.2.5/sysdeps/powerpc/fpu/fe_nomask.c 2004-09-03 19:00:38.000000000 -0500
613 @@ -0,0 +1,32 @@
614 +/* Procedure definition for FE_NOMASK_ENV.
615 +   Copyright (C) 1997 Free Software Foundation, Inc.
616 +   This file is part of the GNU C Library.
617 +
618 +   The GNU C Library is free software; you can redistribute it and/or
619 +   modify it under the terms of the GNU Lesser General Public
620 +   License as published by the Free Software Foundation; either
621 +   version 2.1 of the License, or (at your option) any later version.
622 +
623 +   The GNU C Library is distributed in the hope that it will be useful,
624 +   but WITHOUT ANY WARRANTY; without even the implied warranty of
625 +   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
626 +   Lesser General Public License for more details.
627 +
628 +   You should have received a copy of the GNU Lesser General Public
629 +   License along with the GNU C Library; if not, write to the Free
630 +   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
631 +   02111-1307 USA.  */
632 +
633 +#include <fenv.h>
634 +#include <errno.h>
635 +
636 +/* This is presently a stub, until it's decided how the kernels should
637 +   support this.  */
638 +
639 +const fenv_t *
640 +__fe_nomask_env(void)
641 +{
642 +  __set_errno (ENOSYS);
643 +  return FE_ENABLED_ENV;
644 +}
645 +stub_warning (__fe_nomask_env)
646 --- /dev/null   2004-06-02 16:28:12.000000000 -0500
647 +++ glibc-2.2.5/sysdeps/powerpc/fpu/fprrest.S   2004-09-03 19:00:38.000000000 -0500
648 @@ -0,0 +1,94 @@
649 +/* Copyright (C) 2000, 2001 Free Software Foundation, Inc.
650 +   This file is part of the GNU C Library.
651 +
652 +   The GNU C Library is free software; you can redistribute it and/or
653 +   modify it under the terms of the GNU Lesser General Public
654 +   License as published by the Free Software Foundation; either
655 +   version 2.1 of the License, or (at your option) any later version.
656 +
657 +   The GNU C Library is distributed in the hope that it will be useful,
658 +   but WITHOUT ANY WARRANTY; without even the implied warranty of
659 +   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
660 +   Lesser General Public License for more details.
661 +
662 +   You should have received a copy of the GNU Lesser General Public
663 +   License along with the GNU C Library; if not, write to the Free
664 +   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
665 +   02111-1307 USA.  */
666 +
667 +/*
668 +    Floating Point Registers (FPRs) restore routine
669 +*/
670 +
671 +#include <sysdep.h>
672 +
673 +ENTRY(_restfpr_all)
674 +               ASM_GLOBAL_DIRECTIVE C_TEXT(_restf14)
675 +               ASM_GLOBAL_DIRECTIVE C_TEXT(_restfpr_14)
676 +C_TEXT(_restf14):
677 +C_TEXT(_restfpr_14):   lfd     fp14,-144(r1)
678 +               ASM_GLOBAL_DIRECTIVE C_TEXT(_restf15)
679 +               ASM_GLOBAL_DIRECTIVE C_TEXT(_restfpr_15)
680 +C_TEXT(_restf15):
681 +C_TEXT(_restfpr_15):   lfd     fp15,-136(r1)
682 +               ASM_GLOBAL_DIRECTIVE C_TEXT(_restf16)
683 +               ASM_GLOBAL_DIRECTIVE C_TEXT(_restfpr_16)
684 +C_TEXT(_restf16):
685 +C_TEXT(_restfpr_16):   lfd     fp16,-128(r1)
686 +               ASM_GLOBAL_DIRECTIVE C_TEXT(_restf17)
687 +               ASM_GLOBAL_DIRECTIVE C_TEXT(_restfpr_17)
688 +C_TEXT(_restf17):
689 +C_TEXT(_restfpr_17):   lfd     fp17,-120(r1)
690 +               ASM_GLOBAL_DIRECTIVE C_TEXT(_restf18)
691 +               ASM_GLOBAL_DIRECTIVE C_TEXT(_restfpr_18)
692 +C_TEXT(_restf18):
693 +C_TEXT(_restfpr_18):   lfd     fp18,-112(r1)
694 +               ASM_GLOBAL_DIRECTIVE C_TEXT(_restf19)
695 +               ASM_GLOBAL_DIRECTIVE C_TEXT(_restfpr_19)
696 +C_TEXT(_restf19):
697 +C_TEXT(_restfpr_19):   lfd     fp19,-104(r1)
698 +               ASM_GLOBAL_DIRECTIVE C_TEXT(_restf20)
699 +               ASM_GLOBAL_DIRECTIVE C_TEXT(_restfpr_20)
700 +C_TEXT(_restf20):
701 +C_TEXT(_restfpr_20):   lfd     fp20,-96(r1)
702 +               ASM_GLOBAL_DIRECTIVE C_TEXT(_restf21)
703 +               ASM_GLOBAL_DIRECTIVE C_TEXT(_restfpr_21)
704 +C_TEXT(_restf21):
705 +C_TEXT(_restfpr_21):   lfd     fp21,-88(r1)
706 +               ASM_GLOBAL_DIRECTIVE C_TEXT(_restf22)
707 +               ASM_GLOBAL_DIRECTIVE C_TEXT(_restfpr_22)
708 +C_TEXT(_restf22):
709 +C_TEXT(_restfpr_22):   lfd     fp22,-80(r1)
710 +               ASM_GLOBAL_DIRECTIVE C_TEXT(_restf23)
711 +               ASM_GLOBAL_DIRECTIVE C_TEXT(_restfpr_23)
712 +C_TEXT(_restf23):
713 +C_TEXT(_restfpr_23):   lfd     fp23,-72(r1)
714 +               ASM_GLOBAL_DIRECTIVE C_TEXT(_restf24)
715 +               ASM_GLOBAL_DIRECTIVE C_TEXT(_restfpr_24)
716 +C_TEXT(_restf24):
717 +C_TEXT(_restfpr_24):   lfd     fp24,-64(r1)
718 +               ASM_GLOBAL_DIRECTIVE C_TEXT(_restf25)
719 +               ASM_GLOBAL_DIRECTIVE C_TEXT(_restfpr_25)
720 +C_TEXT(_restf25):
721 +C_TEXT(_restfpr_25):   lfd     fp25,-56(r1)
722 +               ASM_GLOBAL_DIRECTIVE C_TEXT(_restf26)
723 +               ASM_GLOBAL_DIRECTIVE C_TEXT(_restfpr_26)
724 +C_TEXT(_restf26):
725 +C_TEXT(_restfpr_26):   lfd     fp26,-48(r1)
726 +               ASM_GLOBAL_DIRECTIVE C_TEXT(_restf27)
727 +               ASM_GLOBAL_DIRECTIVE C_TEXT(_restfpr_27)
728 +C_TEXT(_restf27):
729 +C_TEXT(_restfpr_27):   lfd     fp27,-40(r1)
730 +               ASM_GLOBAL_DIRECTIVE C_TEXT(_restf28)
731 +               ASM_GLOBAL_DIRECTIVE C_TEXT(_restfpr_28)
732 +C_TEXT(_restf28):
733 +C_TEXT(_restfpr_28):   lfd     fp28,-32(r1)
734 +               ASM_GLOBAL_DIRECTIVE C_TEXT(_restf29)
735 +               ASM_GLOBAL_DIRECTIVE C_TEXT(_restfpr_29)
736 +C_TEXT(_restf29):
737 +C_TEXT(_restfpr_29):   lwz     r0,8(r1)        #get return address from frame
738 +                       lfd     fp29,-24(r1)    #restore f29
739 +                       mtlr    r0              #move return address to LR
740 +                       lfd     fp30,-16(r1)    #restore f30
741 +                       lfd     fp31,-8(r1)     #restore f31
742 +                       blr                     #return
743 --- /dev/null   2004-06-02 16:28:12.000000000 -0500
744 +++ glibc-2.2.5/sysdeps/powerpc/fpu/fprsave.S   2004-09-03 19:00:38.000000000 -0500
745 @@ -0,0 +1,93 @@
746 +/* Copyright (C) 2000, 2001 Free Software Foundation, Inc.
747 +   This file is part of the GNU C Library.
748 +
749 +   The GNU C Library is free software; you can redistribute it and/or
750 +   modify it under the terms of the GNU Lesser General Public
751 +   License as published by the Free Software Foundation; either
752 +   version 2.1 of the License, or (at your option) any later version.
753 +
754 +   The GNU C Library is distributed in the hope that it will be useful,
755 +   but WITHOUT ANY WARRANTY; without even the implied warranty of
756 +   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
757 +   Lesser General Public License for more details.
758 +
759 +   You should have received a copy of the GNU Lesser General Public
760 +   License along with the GNU C Library; if not, write to the Free
761 +   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
762 +   02111-1307 USA.  */
763 +
764 +/*
765 +    Floating Point Registers (FPRs) save routine
766 +*/
767 +
768 +#include <sysdep.h>
769 +
770 +ENTRY(_savefpr_all)
771 +                ASM_GLOBAL_DIRECTIVE C_TEXT(_savef14)
772 +               ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_14)
773 +C_TEXT(_savef14):
774 +C_TEXT(_savefpr_14):   stfd    fp14,-144(r1)
775 +               ASM_GLOBAL_DIRECTIVE C_TEXT(_savef15)
776 +               ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_15)
777 +C_TEXT(_savef15):
778 +C_TEXT(_savefpr_15):   stfd    fp15,-136(r1)
779 +               ASM_GLOBAL_DIRECTIVE C_TEXT(_savef16)
780 +               ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_16)
781 +C_TEXT(_savef16):
782 +C_TEXT(_savefpr_16):   stfd    fp16,-128(r1)
783 +               ASM_GLOBAL_DIRECTIVE C_TEXT(_savef17)
784 +               ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_17)
785 +C_TEXT(_savef17):
786 +C_TEXT(_savefpr_17):   stfd    fp17,-120(r1)
787 +               ASM_GLOBAL_DIRECTIVE C_TEXT(_savef18)
788 +               ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_18)
789 +C_TEXT(_savef18):
790 +C_TEXT(_savefpr_18):   stfd    fp18,-112(r1)
791 +               ASM_GLOBAL_DIRECTIVE C_TEXT(_savef19)
792 +               ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_19)
793 +C_TEXT(_savef19):
794 +C_TEXT(_savefpr_19):   stfd    fp19,-104(r1)
795 +               ASM_GLOBAL_DIRECTIVE C_TEXT(_savef20)
796 +               ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_20)
797 +C_TEXT(_savef20):
798 +C_TEXT(_savefpr_20):   stfd    fp20,-96(r1)
799 +               ASM_GLOBAL_DIRECTIVE C_TEXT(_savef21)
800 +               ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_21)
801 +C_TEXT(_savef21):
802 +C_TEXT(_savefpr_21):   stfd    fp21,-88(r1)
803 +               ASM_GLOBAL_DIRECTIVE C_TEXT(_savef22)
804 +               ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_22)
805 +C_TEXT(_savef22):
806 +C_TEXT(_savefpr_22):   stfd    fp22,-80(r1)
807 +               ASM_GLOBAL_DIRECTIVE C_TEXT(_savef23)
808 +               ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_23)
809 +C_TEXT(_savef23):
810 +C_TEXT(_savefpr_23):   stfd    fp23,-72(r1)
811 +               ASM_GLOBAL_DIRECTIVE C_TEXT(_savef24)
812 +               ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_24)
813 +C_TEXT(_savef24):
814 +C_TEXT(_savefpr_24):   stfd    fp24,-64(r1)
815 +               ASM_GLOBAL_DIRECTIVE C_TEXT(_savef25)
816 +               ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_25)
817 +C_TEXT(_savef25):
818 +C_TEXT(_savefpr_25):   stfd    fp25,-56(r1)
819 +               ASM_GLOBAL_DIRECTIVE C_TEXT(_savef26)
820 +               ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_26)
821 +C_TEXT(_savef26):
822 +C_TEXT(_savefpr_26):   stfd    fp26,-48(r1)
823 +               ASM_GLOBAL_DIRECTIVE C_TEXT(_savef27)
824 +               ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_27)
825 +C_TEXT(_savef27):
826 +C_TEXT(_savefpr_27):   stfd    fp27,-40(r1)
827 +               ASM_GLOBAL_DIRECTIVE C_TEXT(_savef28)
828 +               ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_28)
829 +C_TEXT(_savef28):
830 +C_TEXT(_savefpr_28):   stfd    fp28,-32(r1)
831 +               ASM_GLOBAL_DIRECTIVE C_TEXT(_savef29)
832 +               ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_29)
833 +C_TEXT(_savef29):
834 +C_TEXT(_savefpr_29):   stfd    fp29,-24(r1)    #save f29
835 +                       stfd    fp30,-16(r1)    #save f30
836 +                       stfd    fp31,-8(r1)     #save f31
837 +                       stw     r0,8(r1)        #save LR in callers frame
838 +                       blr                     #return
839 --- /dev/null   2004-06-02 16:28:12.000000000 -0500
840 +++ glibc-2.2.5/sysdeps/powerpc/fpu/fpu_control.h       2004-09-03 19:00:38.000000000 -0500
841 @@ -0,0 +1,67 @@
842 +/* FPU control word definitions.  PowerPC version.
843 +   Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
844 +   This file is part of the GNU C Library.
845 +
846 +   The GNU C Library is free software; you can redistribute it and/or
847 +   modify it under the terms of the GNU Lesser General Public
848 +   License as published by the Free Software Foundation; either
849 +   version 2.1 of the License, or (at your option) any later version.
850 +
851 +   The GNU C Library is distributed in the hope that it will be useful,
852 +   but WITHOUT ANY WARRANTY; without even the implied warranty of
853 +   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
854 +   Lesser General Public License for more details.
855 +
856 +   You should have received a copy of the GNU Lesser General Public
857 +   License along with the GNU C Library; if not, write to the Free
858 +   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
859 +   02111-1307 USA.  */
860 +
861 +#ifndef _FPU_CONTROL_H
862 +#define _FPU_CONTROL_H
863 +
864 +/* rounding control */
865 +#define _FPU_RC_NEAREST 0x00   /* RECOMMENDED */
866 +#define _FPU_RC_DOWN    0x03
867 +#define _FPU_RC_UP      0x02
868 +#define _FPU_RC_ZERO    0x01
869 +
870 +#define _FPU_MASK_NI  0x04 /* non-ieee mode */
871 +
872 +/* masking of interrupts */
873 +#define _FPU_MASK_ZM  0x10 /* zero divide */
874 +#define _FPU_MASK_OM  0x40 /* overflow */
875 +#define _FPU_MASK_UM  0x20 /* underflow */
876 +#define _FPU_MASK_XM  0x08 /* inexact */
877 +#define _FPU_MASK_IM  0x80 /* invalid operation */
878 +
879 +#define _FPU_RESERVED 0xffffff00 /* These bits are reserved are not changed. */
880 +
881 +/* The fdlibm code requires no interrupts for exceptions.  */
882 +#define _FPU_DEFAULT  0x00000000 /* Default value.  */
883 +
884 +/* IEEE:  same as above, but (some) exceptions;
885 +   we leave the 'inexact' exception off.
886 + */
887 +#define _FPU_IEEE     0x000000f0
888 +
889 +/* Type of the control word.  */
890 +typedef unsigned int fpu_control_t __attribute__ ((__mode__ (__SI__)));
891 +
892 +/* Macros for accessing the hardware control word.  */
893 +#define _FPU_GETCW(cw) ( { \
894 +  union { double d; fpu_control_t cw[2]; } tmp __attribute__ ((__aligned__(8))); \
895 +  __asm__ ("mffs 0; stfd%U0 0,%0" : "=m" (tmp.d) : : "fr0"); \
896 +  (cw)=tmp.cw[1]; \
897 +  tmp.cw[1]; } )
898 +#define _FPU_SETCW(cw) { \
899 +  union { double d; fpu_control_t cw[2]; } tmp __attribute__ ((__aligned__(8))); \
900 +  tmp.cw[0] = 0xFFF80000; /* More-or-less arbitrary; this is a QNaN. */ \
901 +  tmp.cw[1] = cw; \
902 +  __asm__ ("lfd%U0 0,%0; mtfsf 255,0" : : "m" (tmp.d) : "fr0"); \
903 +}
904 +
905 +/* Default control word set at startup.  */
906 +extern fpu_control_t __fpu_control;
907 +
908 +#endif /* _FPU_CONTROL_H */
909 --- /dev/null   2004-06-02 16:28:12.000000000 -0500
910 +++ glibc-2.2.5/sysdeps/powerpc/fpu/setjmp.S    2004-09-03 19:00:38.000000000 -0500
911 @@ -0,0 +1,73 @@
912 +/* setjmp for PowerPC.
913 +   Copyright (C) 1995, 1996, 1997, 1999, 2000 Free Software Foundation, Inc.
914 +   This file is part of the GNU C Library.
915 +
916 +   The GNU C Library is free software; you can redistribute it and/or
917 +   modify it under the terms of the GNU Library General Public License as
918 +   published by the Free Software Foundation; either version 2 of the
919 +   License, or (at your option) any later version.
920 +
921 +   The GNU C Library is distributed in the hope that it will be useful,
922 +   but WITHOUT ANY WARRANTY; without even the implied warranty of
923 +   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
924 +   Library General Public License for more details.
925 +
926 +   You should have received a copy of the GNU Library General Public
927 +   License along with the GNU C Library; see the file COPYING.LIB.  If not,
928 +   write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
929 +   Boston, MA 02111-1307, USA.  */
930 +
931 +#include <sysdep.h>
932 +#define _ASM
933 +#define _SETJMP_H
934 +#include <bits/setjmp.h>
935 +#include <bp-sym.h>
936 +#include <bp-asm.h>
937 +
938 +ENTRY (BP_SYM (__sigsetjmp))
939 +       CHECK_BOUNDS_BOTH_WIDE_LIT (r3, r8, r9, JB_SIZE)
940 +
941 +       stw  r1,(JB_GPR1*4)(3)
942 +       mflr r0
943 +       stw  r2,(JB_GPR2*4)(3)
944 +       stw  r14,((JB_GPRS+0)*4)(3)
945 +       stfd fp14,((JB_FPRS+0*2)*4)(3)
946 +       stw  r0,(JB_LR*4)(3)
947 +       stw  r15,((JB_GPRS+1)*4)(3)
948 +       stfd fp15,((JB_FPRS+1*2)*4)(3)
949 +       mfcr r0
950 +       stw  r16,((JB_GPRS+2)*4)(3)
951 +       stfd fp16,((JB_FPRS+2*2)*4)(3)
952 +       stw  r0,(JB_CR*4)(3)
953 +       stw  r17,((JB_GPRS+3)*4)(3)
954 +       stfd fp17,((JB_FPRS+3*2)*4)(3)
955 +       stw  r18,((JB_GPRS+4)*4)(3)
956 +       stfd fp18,((JB_FPRS+4*2)*4)(3)
957 +       stw  r19,((JB_GPRS+5)*4)(3)
958 +       stfd fp19,((JB_FPRS+5*2)*4)(3)
959 +       stw  r20,((JB_GPRS+6)*4)(3)
960 +       stfd fp20,((JB_FPRS+6*2)*4)(3)
961 +       stw  r21,((JB_GPRS+7)*4)(3)
962 +       stfd fp21,((JB_FPRS+7*2)*4)(3)
963 +       stw  r22,((JB_GPRS+8)*4)(3)
964 +       stfd fp22,((JB_FPRS+8*2)*4)(3)
965 +       stw  r23,((JB_GPRS+9)*4)(3)
966 +       stfd fp23,((JB_FPRS+9*2)*4)(3)
967 +       stw  r24,((JB_GPRS+10)*4)(3)
968 +       stfd fp24,((JB_FPRS+10*2)*4)(3)
969 +       stw  r25,((JB_GPRS+11)*4)(3)
970 +       stfd fp25,((JB_FPRS+11*2)*4)(3)
971 +       stw  r26,((JB_GPRS+12)*4)(3)
972 +       stfd fp26,((JB_FPRS+12*2)*4)(3)
973 +       stw  r27,((JB_GPRS+13)*4)(3)
974 +       stfd fp27,((JB_FPRS+13*2)*4)(3)
975 +       stw  r28,((JB_GPRS+14)*4)(3)
976 +       stfd fp28,((JB_FPRS+14*2)*4)(3)
977 +       stw  r29,((JB_GPRS+15)*4)(3)
978 +       stfd fp29,((JB_FPRS+15*2)*4)(3)
979 +       stw  r30,((JB_GPRS+16)*4)(3)
980 +       stfd fp30,((JB_FPRS+16*2)*4)(3)
981 +       stw  r31,((JB_GPRS+17)*4)(3)
982 +       stfd fp31,((JB_FPRS+17*2)*4)(3)
983 +       b JUMPTARGET (BP_SYM (__sigjmp_save))
984 +END (BP_SYM (__sigsetjmp))
985 --- glibc-2.2.5/sysdeps/powerpc/fpu_control.h~glibc-2.2.5-hhl-powerpc-fpu.patch
986 +++ glibc-2.2.5/sysdeps/powerpc/fpu_control.h
987 -/* FPU control word definitions.  PowerPC version.
988 -   Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
989 -   This file is part of the GNU C Library.
990 -
991 -   The GNU C Library is free software; you can redistribute it and/or
992 -   modify it under the terms of the GNU Lesser General Public
993 -   License as published by the Free Software Foundation; either
994 -   version 2.1 of the License, or (at your option) any later version.
995 -
996 -   The GNU C Library is distributed in the hope that it will be useful,
997 -   but WITHOUT ANY WARRANTY; without even the implied warranty of
998 -   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
999 -   Lesser General Public License for more details.
1000 -
1001 -   You should have received a copy of the GNU Lesser General Public
1002 -   License along with the GNU C Library; if not, write to the Free
1003 -   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
1004 -   02111-1307 USA.  */
1005 -
1006 -#ifndef _FPU_CONTROL_H
1007 -#define _FPU_CONTROL_H
1008 -
1009 -/* rounding control */
1010 -#define _FPU_RC_NEAREST 0x00   /* RECOMMENDED */
1011 -#define _FPU_RC_DOWN    0x03
1012 -#define _FPU_RC_UP      0x02
1013 -#define _FPU_RC_ZERO    0x01
1014 -
1015 -#define _FPU_MASK_NI  0x04 /* non-ieee mode */
1016 -
1017 -/* masking of interrupts */
1018 -#define _FPU_MASK_ZM  0x10 /* zero divide */
1019 -#define _FPU_MASK_OM  0x40 /* overflow */
1020 -#define _FPU_MASK_UM  0x20 /* underflow */
1021 -#define _FPU_MASK_XM  0x08 /* inexact */
1022 -#define _FPU_MASK_IM  0x80 /* invalid operation */
1023 -
1024 -#define _FPU_RESERVED 0xffffff00 /* These bits are reserved are not changed. */
1025 -
1026 -/* The fdlibm code requires no interrupts for exceptions.  */
1027 -#define _FPU_DEFAULT  0x00000000 /* Default value.  */
1028 -
1029 -/* IEEE:  same as above, but (some) exceptions;
1030 -   we leave the 'inexact' exception off.
1031 - */
1032 -#define _FPU_IEEE     0x000000f0
1033 -
1034 -/* Type of the control word.  */
1035 -typedef unsigned int fpu_control_t __attribute__ ((__mode__ (__SI__)));
1036 -
1037 -/* Macros for accessing the hardware control word.  */
1038 -#define _FPU_GETCW(cw) ( { \
1039 -  union { double d; fpu_control_t cw[2]; } tmp __attribute__ ((__aligned__(8))); \
1040 -  __asm__ ("mffs 0; stfd%U0 0,%0" : "=m" (tmp.d) : : "fr0"); \
1041 -  (cw)=tmp.cw[1]; \
1042 -  tmp.cw[1]; } )
1043 -#define _FPU_SETCW(cw) { \
1044 -  union { double d; fpu_control_t cw[2]; } tmp __attribute__ ((__aligned__(8))); \
1045 -  tmp.cw[0] = 0xFFF80000; /* More-or-less arbitrary; this is a QNaN. */ \
1046 -  tmp.cw[1] = cw; \
1047 -  __asm__ ("lfd%U0 0,%0; mtfsf 255,0" : : "m" (tmp.d) : "fr0"); \
1048 -}
1049 -
1050 -/* Default control word set at startup.  */
1051 -extern fpu_control_t __fpu_control;
1052 -
1053 -#endif /* _FPU_CONTROL_H */
1054 --- glibc-2.2.5/sysdeps/powerpc/setjmp.S~glibc-2.2.5-hhl-powerpc-fpu.patch      2004-09-03 19:00:33.000000000 -0500
1055 +++ glibc-2.2.5/sysdeps/powerpc/setjmp.S        2004-09-03 19:00:38.000000000 -0500
1056 @@ -24,6 +24,8 @@
1057  #include <bp-sym.h>
1058  #include <bp-asm.h>
1059  
1060 +/* The FPU stores have been removed from this file - see fpu/setjmp.S */
1061 +
1062  ENTRY (BP_SYM (__sigsetjmp))
1063         CHECK_BOUNDS_BOTH_WIDE_LIT (r3, r8, r9, JB_SIZE)
1064  
1065 @@ -31,43 +33,25 @@
1066         mflr r0
1067         stw  r2,(JB_GPR2*4)(3)
1068         stw  r14,((JB_GPRS+0)*4)(3)
1069 -       stfd fp14,((JB_FPRS+0*2)*4)(3)
1070         stw  r0,(JB_LR*4)(3)
1071         stw  r15,((JB_GPRS+1)*4)(3)
1072 -       stfd fp15,((JB_FPRS+1*2)*4)(3)
1073         mfcr r0
1074         stw  r16,((JB_GPRS+2)*4)(3)
1075 -       stfd fp16,((JB_FPRS+2*2)*4)(3)
1076         stw  r0,(JB_CR*4)(3)
1077         stw  r17,((JB_GPRS+3)*4)(3)
1078 -       stfd fp17,((JB_FPRS+3*2)*4)(3)
1079         stw  r18,((JB_GPRS+4)*4)(3)
1080 -       stfd fp18,((JB_FPRS+4*2)*4)(3)
1081         stw  r19,((JB_GPRS+5)*4)(3)
1082 -       stfd fp19,((JB_FPRS+5*2)*4)(3)
1083         stw  r20,((JB_GPRS+6)*4)(3)
1084 -       stfd fp20,((JB_FPRS+6*2)*4)(3)
1085         stw  r21,((JB_GPRS+7)*4)(3)
1086 -       stfd fp21,((JB_FPRS+7*2)*4)(3)
1087         stw  r22,((JB_GPRS+8)*4)(3)
1088 -       stfd fp22,((JB_FPRS+8*2)*4)(3)
1089         stw  r23,((JB_GPRS+9)*4)(3)
1090 -       stfd fp23,((JB_FPRS+9*2)*4)(3)
1091         stw  r24,((JB_GPRS+10)*4)(3)
1092 -       stfd fp24,((JB_FPRS+10*2)*4)(3)
1093         stw  r25,((JB_GPRS+11)*4)(3)
1094 -       stfd fp25,((JB_FPRS+11*2)*4)(3)
1095         stw  r26,((JB_GPRS+12)*4)(3)
1096 -       stfd fp26,((JB_FPRS+12*2)*4)(3)
1097         stw  r27,((JB_GPRS+13)*4)(3)
1098 -       stfd fp27,((JB_FPRS+13*2)*4)(3)
1099         stw  r28,((JB_GPRS+14)*4)(3)
1100 -       stfd fp28,((JB_FPRS+14*2)*4)(3)
1101         stw  r29,((JB_GPRS+15)*4)(3)
1102 -       stfd fp29,((JB_FPRS+15*2)*4)(3)
1103         stw  r30,((JB_GPRS+16)*4)(3)
1104 -       stfd fp30,((JB_FPRS+16*2)*4)(3)
1105         stw  r31,((JB_GPRS+17)*4)(3)
1106 -       stfd fp31,((JB_FPRS+17*2)*4)(3)
1107         b JUMPTARGET (BP_SYM (__sigjmp_save))
1108  END (BP_SYM (__sigsetjmp))