3 # Patch managed by http://www.mn-logistik.de/unsupported/pxa250/patcher
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
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
21 +cflags += -mnew-mnemonics -Wa,-mppc -mpowerpc
22 asm-CPPFLAGS += -Wa,-mppc
24 -ifeq ($(subdir),math)
25 -libm-support += fenv_const fe_nomask
29 sysdep_routines += ppc-mcount
33 -sysdep_routines += gprsave0 gprrest0 gprsave1 gprrest1 fprsave fprrest
34 +sysdep_routines += gprsave0 gprrest0 gprsave1 gprrest1
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
43 - # symbols used in macros from sysdeps/powerpc/bits/fenv.h
44 - __fe_dfl_env; __fe_enabled_env; __fe_nonieee_env; __fe_nomask_env;
47 # Special functions to save and restore registers used by the
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
55 +/* The FPU loads have been removed from this file - see fpu/__longjmp.S */
57 ENTRY (BP_SYM (__longjmp))
58 CHECK_BOUNDS_BOTH_WIDE_LIT (r3, r8, r9, JB_SIZE)
61 lwz r2,(JB_GPR2*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)
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)
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)
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)
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
110 /* Define the machine-dependent type `jmp_buf'. PowerPC version. */
111 +/* For processors without floating point. */
114 # error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
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)
125 -typedef long int __jmp_buf[58];
126 +typedef long int __jmp_buf[22];
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.
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.
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.
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
151 -#include <fenv_libc.h>
153 -#undef feclearexcept
155 -__feclearexcept (int excepts)
159 - /* Get the current state. */
160 - u.fenv = fegetenv_register ();
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));
166 - /* Put the new state in effect. */
167 - fesetenv_register (u.fenv);
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);
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.
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.
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.
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
204 -/* This is presently a stub, until it's decided how the kernels should
208 -__fe_nomask_env(void)
210 - __set_errno (ENOSYS);
211 - return FE_ENABLED_ENV;
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.
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.
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.
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
235 - Floating Point Registers (FPRs) restore routine
241 - ASM_GLOBAL_DIRECTIVE C_TEXT(_restf14)
242 - ASM_GLOBAL_DIRECTIVE C_TEXT(_restfpr_14)
244 -C_TEXT(_restfpr_14): lfd fp14,-144(r1)
245 - ASM_GLOBAL_DIRECTIVE C_TEXT(_restf15)
246 - ASM_GLOBAL_DIRECTIVE C_TEXT(_restfpr_15)
248 -C_TEXT(_restfpr_15): lfd fp15,-136(r1)
249 - ASM_GLOBAL_DIRECTIVE C_TEXT(_restf16)
250 - ASM_GLOBAL_DIRECTIVE C_TEXT(_restfpr_16)
252 -C_TEXT(_restfpr_16): lfd fp16,-128(r1)
253 - ASM_GLOBAL_DIRECTIVE C_TEXT(_restf17)
254 - ASM_GLOBAL_DIRECTIVE C_TEXT(_restfpr_17)
256 -C_TEXT(_restfpr_17): lfd fp17,-120(r1)
257 - ASM_GLOBAL_DIRECTIVE C_TEXT(_restf18)
258 - ASM_GLOBAL_DIRECTIVE C_TEXT(_restfpr_18)
260 -C_TEXT(_restfpr_18): lfd fp18,-112(r1)
261 - ASM_GLOBAL_DIRECTIVE C_TEXT(_restf19)
262 - ASM_GLOBAL_DIRECTIVE C_TEXT(_restfpr_19)
264 -C_TEXT(_restfpr_19): lfd fp19,-104(r1)
265 - ASM_GLOBAL_DIRECTIVE C_TEXT(_restf20)
266 - ASM_GLOBAL_DIRECTIVE C_TEXT(_restfpr_20)
268 -C_TEXT(_restfpr_20): lfd fp20,-96(r1)
269 - ASM_GLOBAL_DIRECTIVE C_TEXT(_restf21)
270 - ASM_GLOBAL_DIRECTIVE C_TEXT(_restfpr_21)
272 -C_TEXT(_restfpr_21): lfd fp21,-88(r1)
273 - ASM_GLOBAL_DIRECTIVE C_TEXT(_restf22)
274 - ASM_GLOBAL_DIRECTIVE C_TEXT(_restfpr_22)
276 -C_TEXT(_restfpr_22): lfd fp22,-80(r1)
277 - ASM_GLOBAL_DIRECTIVE C_TEXT(_restf23)
278 - ASM_GLOBAL_DIRECTIVE C_TEXT(_restfpr_23)
280 -C_TEXT(_restfpr_23): lfd fp23,-72(r1)
281 - ASM_GLOBAL_DIRECTIVE C_TEXT(_restf24)
282 - ASM_GLOBAL_DIRECTIVE C_TEXT(_restfpr_24)
284 -C_TEXT(_restfpr_24): lfd fp24,-64(r1)
285 - ASM_GLOBAL_DIRECTIVE C_TEXT(_restf25)
286 - ASM_GLOBAL_DIRECTIVE C_TEXT(_restfpr_25)
288 -C_TEXT(_restfpr_25): lfd fp25,-56(r1)
289 - ASM_GLOBAL_DIRECTIVE C_TEXT(_restf26)
290 - ASM_GLOBAL_DIRECTIVE C_TEXT(_restfpr_26)
292 -C_TEXT(_restfpr_26): lfd fp26,-48(r1)
293 - ASM_GLOBAL_DIRECTIVE C_TEXT(_restf27)
294 - ASM_GLOBAL_DIRECTIVE C_TEXT(_restfpr_27)
296 -C_TEXT(_restfpr_27): lfd fp27,-40(r1)
297 - ASM_GLOBAL_DIRECTIVE C_TEXT(_restf28)
298 - ASM_GLOBAL_DIRECTIVE C_TEXT(_restfpr_28)
300 -C_TEXT(_restfpr_28): lfd fp28,-32(r1)
301 - ASM_GLOBAL_DIRECTIVE C_TEXT(_restf29)
302 - ASM_GLOBAL_DIRECTIVE C_TEXT(_restfpr_29)
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
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.
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.
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.
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
331 - Floating Point Registers (FPRs) save routine
337 - ASM_GLOBAL_DIRECTIVE C_TEXT(_savef14)
338 - ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_14)
340 -C_TEXT(_savefpr_14): stfd fp14,-144(r1)
341 - ASM_GLOBAL_DIRECTIVE C_TEXT(_savef15)
342 - ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_15)
344 -C_TEXT(_savefpr_15): stfd fp15,-136(r1)
345 - ASM_GLOBAL_DIRECTIVE C_TEXT(_savef16)
346 - ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_16)
348 -C_TEXT(_savefpr_16): stfd fp16,-128(r1)
349 - ASM_GLOBAL_DIRECTIVE C_TEXT(_savef17)
350 - ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_17)
352 -C_TEXT(_savefpr_17): stfd fp17,-120(r1)
353 - ASM_GLOBAL_DIRECTIVE C_TEXT(_savef18)
354 - ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_18)
356 -C_TEXT(_savefpr_18): stfd fp18,-112(r1)
357 - ASM_GLOBAL_DIRECTIVE C_TEXT(_savef19)
358 - ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_19)
360 -C_TEXT(_savefpr_19): stfd fp19,-104(r1)
361 - ASM_GLOBAL_DIRECTIVE C_TEXT(_savef20)
362 - ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_20)
364 -C_TEXT(_savefpr_20): stfd fp20,-96(r1)
365 - ASM_GLOBAL_DIRECTIVE C_TEXT(_savef21)
366 - ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_21)
368 -C_TEXT(_savefpr_21): stfd fp21,-88(r1)
369 - ASM_GLOBAL_DIRECTIVE C_TEXT(_savef22)
370 - ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_22)
372 -C_TEXT(_savefpr_22): stfd fp22,-80(r1)
373 - ASM_GLOBAL_DIRECTIVE C_TEXT(_savef23)
374 - ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_23)
376 -C_TEXT(_savefpr_23): stfd fp23,-72(r1)
377 - ASM_GLOBAL_DIRECTIVE C_TEXT(_savef24)
378 - ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_24)
380 -C_TEXT(_savefpr_24): stfd fp24,-64(r1)
381 - ASM_GLOBAL_DIRECTIVE C_TEXT(_savef25)
382 - ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_25)
384 -C_TEXT(_savefpr_25): stfd fp25,-56(r1)
385 - ASM_GLOBAL_DIRECTIVE C_TEXT(_savef26)
386 - ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_26)
388 -C_TEXT(_savefpr_26): stfd fp26,-48(r1)
389 - ASM_GLOBAL_DIRECTIVE C_TEXT(_savef27)
390 - ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_27)
392 -C_TEXT(_savefpr_27): stfd fp27,-40(r1)
393 - ASM_GLOBAL_DIRECTIVE C_TEXT(_savef28)
394 - ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_28)
396 -C_TEXT(_savefpr_28): stfd fp28,-32(r1)
397 - ASM_GLOBAL_DIRECTIVE C_TEXT(_savef29)
398 - ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_29)
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
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
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
417 ifeq ($(subdir),math)
418 libm-support += fenv_const fe_nomask t_sqrt
421 +ifeq ($(subdir),misc)
422 +sysdep_routines += fprsave fprrest
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
429 + # symbols used in macros from sysdeps/powerpc/bits/fenv.h
430 + __fe_dfl_env; __fe_enabled_env; __fe_nonieee_env; __fe_nomask_env;
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
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.
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.
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.
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. */
458 +#include <bits/setjmp.h>
462 +ENTRY (BP_SYM (__longjmp))
463 + CHECK_BOUNDS_BOTH_WIDE_LIT (r3, r8, r9, JB_SIZE)
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)
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)
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)
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
513 +/* Copyright (C) 1997, 1998, 2000 Free Software Foundation, Inc.
514 + This file is part of the GNU C Library.
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.
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.
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. */
531 +/* Define the machine-dependent type `jmp_buf'. PowerPC version. */
534 +# error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
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. */
542 +#if defined __USE_MISC || defined _ASM
543 +# define JB_GPR1 0 /* Also known as the stack pointer */
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)
553 +typedef long int __jmp_buf[58];
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
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.
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.
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.
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
582 +#include <fenv_libc.h>
584 +#undef feclearexcept
586 +__feclearexcept (int excepts)
590 + /* Get the current state. */
591 + u.fenv = fegetenv_register ();
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));
597 + /* Put the new state in effect. */
598 + fesetenv_register (u.fenv);
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);
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
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.
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.
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.
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
636 +/* This is presently a stub, until it's decided how the kernels should
640 +__fe_nomask_env(void)
642 + __set_errno (ENOSYS);
643 + return FE_ENABLED_ENV;
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
649 +/* Copyright (C) 2000, 2001 Free Software Foundation, Inc.
650 + This file is part of the GNU C Library.
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.
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.
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
668 + Floating Point Registers (FPRs) restore routine
674 + ASM_GLOBAL_DIRECTIVE C_TEXT(_restf14)
675 + ASM_GLOBAL_DIRECTIVE C_TEXT(_restfpr_14)
677 +C_TEXT(_restfpr_14): lfd fp14,-144(r1)
678 + ASM_GLOBAL_DIRECTIVE C_TEXT(_restf15)
679 + ASM_GLOBAL_DIRECTIVE C_TEXT(_restfpr_15)
681 +C_TEXT(_restfpr_15): lfd fp15,-136(r1)
682 + ASM_GLOBAL_DIRECTIVE C_TEXT(_restf16)
683 + ASM_GLOBAL_DIRECTIVE C_TEXT(_restfpr_16)
685 +C_TEXT(_restfpr_16): lfd fp16,-128(r1)
686 + ASM_GLOBAL_DIRECTIVE C_TEXT(_restf17)
687 + ASM_GLOBAL_DIRECTIVE C_TEXT(_restfpr_17)
689 +C_TEXT(_restfpr_17): lfd fp17,-120(r1)
690 + ASM_GLOBAL_DIRECTIVE C_TEXT(_restf18)
691 + ASM_GLOBAL_DIRECTIVE C_TEXT(_restfpr_18)
693 +C_TEXT(_restfpr_18): lfd fp18,-112(r1)
694 + ASM_GLOBAL_DIRECTIVE C_TEXT(_restf19)
695 + ASM_GLOBAL_DIRECTIVE C_TEXT(_restfpr_19)
697 +C_TEXT(_restfpr_19): lfd fp19,-104(r1)
698 + ASM_GLOBAL_DIRECTIVE C_TEXT(_restf20)
699 + ASM_GLOBAL_DIRECTIVE C_TEXT(_restfpr_20)
701 +C_TEXT(_restfpr_20): lfd fp20,-96(r1)
702 + ASM_GLOBAL_DIRECTIVE C_TEXT(_restf21)
703 + ASM_GLOBAL_DIRECTIVE C_TEXT(_restfpr_21)
705 +C_TEXT(_restfpr_21): lfd fp21,-88(r1)
706 + ASM_GLOBAL_DIRECTIVE C_TEXT(_restf22)
707 + ASM_GLOBAL_DIRECTIVE C_TEXT(_restfpr_22)
709 +C_TEXT(_restfpr_22): lfd fp22,-80(r1)
710 + ASM_GLOBAL_DIRECTIVE C_TEXT(_restf23)
711 + ASM_GLOBAL_DIRECTIVE C_TEXT(_restfpr_23)
713 +C_TEXT(_restfpr_23): lfd fp23,-72(r1)
714 + ASM_GLOBAL_DIRECTIVE C_TEXT(_restf24)
715 + ASM_GLOBAL_DIRECTIVE C_TEXT(_restfpr_24)
717 +C_TEXT(_restfpr_24): lfd fp24,-64(r1)
718 + ASM_GLOBAL_DIRECTIVE C_TEXT(_restf25)
719 + ASM_GLOBAL_DIRECTIVE C_TEXT(_restfpr_25)
721 +C_TEXT(_restfpr_25): lfd fp25,-56(r1)
722 + ASM_GLOBAL_DIRECTIVE C_TEXT(_restf26)
723 + ASM_GLOBAL_DIRECTIVE C_TEXT(_restfpr_26)
725 +C_TEXT(_restfpr_26): lfd fp26,-48(r1)
726 + ASM_GLOBAL_DIRECTIVE C_TEXT(_restf27)
727 + ASM_GLOBAL_DIRECTIVE C_TEXT(_restfpr_27)
729 +C_TEXT(_restfpr_27): lfd fp27,-40(r1)
730 + ASM_GLOBAL_DIRECTIVE C_TEXT(_restf28)
731 + ASM_GLOBAL_DIRECTIVE C_TEXT(_restfpr_28)
733 +C_TEXT(_restfpr_28): lfd fp28,-32(r1)
734 + ASM_GLOBAL_DIRECTIVE C_TEXT(_restf29)
735 + ASM_GLOBAL_DIRECTIVE C_TEXT(_restfpr_29)
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
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
746 +/* Copyright (C) 2000, 2001 Free Software Foundation, Inc.
747 + This file is part of the GNU C Library.
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.
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.
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
765 + Floating Point Registers (FPRs) save routine
771 + ASM_GLOBAL_DIRECTIVE C_TEXT(_savef14)
772 + ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_14)
774 +C_TEXT(_savefpr_14): stfd fp14,-144(r1)
775 + ASM_GLOBAL_DIRECTIVE C_TEXT(_savef15)
776 + ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_15)
778 +C_TEXT(_savefpr_15): stfd fp15,-136(r1)
779 + ASM_GLOBAL_DIRECTIVE C_TEXT(_savef16)
780 + ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_16)
782 +C_TEXT(_savefpr_16): stfd fp16,-128(r1)
783 + ASM_GLOBAL_DIRECTIVE C_TEXT(_savef17)
784 + ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_17)
786 +C_TEXT(_savefpr_17): stfd fp17,-120(r1)
787 + ASM_GLOBAL_DIRECTIVE C_TEXT(_savef18)
788 + ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_18)
790 +C_TEXT(_savefpr_18): stfd fp18,-112(r1)
791 + ASM_GLOBAL_DIRECTIVE C_TEXT(_savef19)
792 + ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_19)
794 +C_TEXT(_savefpr_19): stfd fp19,-104(r1)
795 + ASM_GLOBAL_DIRECTIVE C_TEXT(_savef20)
796 + ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_20)
798 +C_TEXT(_savefpr_20): stfd fp20,-96(r1)
799 + ASM_GLOBAL_DIRECTIVE C_TEXT(_savef21)
800 + ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_21)
802 +C_TEXT(_savefpr_21): stfd fp21,-88(r1)
803 + ASM_GLOBAL_DIRECTIVE C_TEXT(_savef22)
804 + ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_22)
806 +C_TEXT(_savefpr_22): stfd fp22,-80(r1)
807 + ASM_GLOBAL_DIRECTIVE C_TEXT(_savef23)
808 + ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_23)
810 +C_TEXT(_savefpr_23): stfd fp23,-72(r1)
811 + ASM_GLOBAL_DIRECTIVE C_TEXT(_savef24)
812 + ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_24)
814 +C_TEXT(_savefpr_24): stfd fp24,-64(r1)
815 + ASM_GLOBAL_DIRECTIVE C_TEXT(_savef25)
816 + ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_25)
818 +C_TEXT(_savefpr_25): stfd fp25,-56(r1)
819 + ASM_GLOBAL_DIRECTIVE C_TEXT(_savef26)
820 + ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_26)
822 +C_TEXT(_savefpr_26): stfd fp26,-48(r1)
823 + ASM_GLOBAL_DIRECTIVE C_TEXT(_savef27)
824 + ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_27)
826 +C_TEXT(_savefpr_27): stfd fp27,-40(r1)
827 + ASM_GLOBAL_DIRECTIVE C_TEXT(_savef28)
828 + ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_28)
830 +C_TEXT(_savefpr_28): stfd fp28,-32(r1)
831 + ASM_GLOBAL_DIRECTIVE C_TEXT(_savef29)
832 + ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_29)
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
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
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.
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.
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.
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
861 +#ifndef _FPU_CONTROL_H
862 +#define _FPU_CONTROL_H
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
870 +#define _FPU_MASK_NI 0x04 /* non-ieee mode */
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 */
879 +#define _FPU_RESERVED 0xffffff00 /* These bits are reserved are not changed. */
881 +/* The fdlibm code requires no interrupts for exceptions. */
882 +#define _FPU_DEFAULT 0x00000000 /* Default value. */
884 +/* IEEE: same as above, but (some) exceptions;
885 + we leave the 'inexact' exception off.
887 +#define _FPU_IEEE 0x000000f0
889 +/* Type of the control word. */
890 +typedef unsigned int fpu_control_t __attribute__ ((__mode__ (__SI__)));
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"); \
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. */ \
902 + __asm__ ("lfd%U0 0,%0; mtfsf 255,0" : : "m" (tmp.d) : "fr0"); \
905 +/* Default control word set at startup. */
906 +extern fpu_control_t __fpu_control;
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
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.
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.
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.
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. */
934 +#include <bits/setjmp.h>
938 +ENTRY (BP_SYM (__sigsetjmp))
939 + CHECK_BOUNDS_BOTH_WIDE_LIT (r3, r8, r9, JB_SIZE)
941 + stw r1,(JB_GPR1*4)(3)
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)
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.
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.
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.
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. */
1006 -#ifndef _FPU_CONTROL_H
1007 -#define _FPU_CONTROL_H
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
1015 -#define _FPU_MASK_NI 0x04 /* non-ieee mode */
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 */
1024 -#define _FPU_RESERVED 0xffffff00 /* These bits are reserved are not changed. */
1026 -/* The fdlibm code requires no interrupts for exceptions. */
1027 -#define _FPU_DEFAULT 0x00000000 /* Default value. */
1029 -/* IEEE: same as above, but (some) exceptions;
1030 - we leave the 'inexact' exception off.
1032 -#define _FPU_IEEE 0x000000f0
1034 -/* Type of the control word. */
1035 -typedef unsigned int fpu_control_t __attribute__ ((__mode__ (__SI__)));
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"); \
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. */ \
1047 - __asm__ ("lfd%U0 0,%0; mtfsf 255,0" : : "m" (tmp.d) : "fr0"); \
1050 -/* Default control word set at startup. */
1051 -extern fpu_control_t __fpu_control;
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
1060 +/* The FPU stores have been removed from this file - see fpu/setjmp.S */
1062 ENTRY (BP_SYM (__sigsetjmp))
1063 CHECK_BOUNDS_BOTH_WIDE_LIT (r3, r8, r9, JB_SIZE)
1067 stw r2,(JB_GPR2*4)(3)
1068 stw r14,((JB_GPRS+0)*4)(3)
1069 - stfd fp14,((JB_FPRS+0*2)*4)(3)
1071 stw r15,((JB_GPRS+1)*4)(3)
1072 - stfd fp15,((JB_FPRS+1*2)*4)(3)
1074 stw r16,((JB_GPRS+2)*4)(3)
1075 - stfd fp16,((JB_FPRS+2*2)*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))