Clean the sample saving script.
1 # See http://sources.redhat.com/ml/crossgcc/2002-05/msg00132.html
2 # This patch is taken directly from the Montavista Hard Hat Linux 2.0 source RPMs,
3 # but has been rediffed against glibc-2.2.5
5 diff -Naur glibc-2.2.5.old/sysdeps/powerpc/Dist glibc-2.2.5/sysdeps/powerpc/Dist
6 --- glibc-2.2.5.old/sysdeps/powerpc/Dist Fri Jun 30 23:30:21 2000
7 +++ glibc-2.2.5/sysdeps/powerpc/Dist Thu Jul 10 11:43:17 2003
18 diff -Naur glibc-2.2.5.old/sysdeps/powerpc/Makefile glibc-2.2.5/sysdeps/powerpc/Makefile
19 --- glibc-2.2.5.old/sysdeps/powerpc/Makefile Mon Nov 27 15:32:47 2000
20 +++ glibc-2.2.5/sysdeps/powerpc/Makefile Thu Jul 10 11:43:17 2003
22 +cflags += -mnew-mnemonics -Wa,-mppc -mpowerpc
23 asm-CPPFLAGS += -Wa,-mppc
25 -ifeq ($(subdir),math)
26 -libm-support += fenv_const fe_nomask
30 sysdep_routines += ppc-mcount
34 -sysdep_routines += gprsave0 gprrest0 gprsave1 gprrest1 fprsave fprrest
35 +sysdep_routines += gprsave0 gprrest0 gprsave1 gprrest1
38 # On PPC, -fpic works until the GOT contains 2^15 bytes, and possibly
39 diff -Naur glibc-2.2.5.old/sysdeps/powerpc/Versions glibc-2.2.5/sysdeps/powerpc/Versions
40 --- glibc-2.2.5.old/sysdeps/powerpc/Versions Mon Feb 28 13:27:57 2000
41 +++ glibc-2.2.5/sysdeps/powerpc/Versions Thu Jul 10 11:43:17 2003
45 - # symbols used in macros from sysdeps/powerpc/bits/fenv.h
46 - __fe_dfl_env; __fe_enabled_env; __fe_nonieee_env; __fe_nomask_env;
49 # Special functions to save and restore registers used by the
51 diff -Naur glibc-2.2.5.old/sysdeps/powerpc/__longjmp.S glibc-2.2.5/sysdeps/powerpc/__longjmp.S
52 --- glibc-2.2.5.old/sysdeps/powerpc/__longjmp.S Thu Jul 5 21:56:01 2001
53 +++ glibc-2.2.5/sysdeps/powerpc/__longjmp.S Thu Jul 10 11:43:17 2003
58 +/* The FPU loads have been removed from this file - see fpu/__longjmp.S */
60 ENTRY (BP_SYM (__longjmp))
61 CHECK_BOUNDS_BOTH_WIDE_LIT (r3, r8, r9, JB_SIZE)
64 lwz r2,(JB_GPR2*4)(r3)
66 lwz r14,((JB_GPRS+0)*4)(r3)
67 - lfd fp14,((JB_FPRS+0*2)*4)(r3)
68 lwz r15,((JB_GPRS+1)*4)(r3)
69 - lfd fp15,((JB_FPRS+1*2)*4)(r3)
70 lwz r16,((JB_GPRS+2)*4)(r3)
71 - lfd fp16,((JB_FPRS+2*2)*4)(r3)
72 lwz r17,((JB_GPRS+3)*4)(r3)
73 - lfd fp17,((JB_FPRS+3*2)*4)(r3)
74 lwz r18,((JB_GPRS+4)*4)(r3)
75 - lfd fp18,((JB_FPRS+4*2)*4)(r3)
76 lwz r19,((JB_GPRS+5)*4)(r3)
77 - lfd fp19,((JB_FPRS+5*2)*4)(r3)
78 lwz r20,((JB_GPRS+6)*4)(r3)
79 - lfd fp20,((JB_FPRS+6*2)*4)(r3)
81 lwz r21,((JB_GPRS+7)*4)(r3)
82 - lfd fp21,((JB_FPRS+7*2)*4)(r3)
83 lwz r22,((JB_GPRS+8)*4)(r3)
84 - lfd fp22,((JB_FPRS+8*2)*4)(r3)
86 lwz r23,((JB_GPRS+9)*4)(r3)
87 - lfd fp23,((JB_FPRS+9*2)*4)(r3)
88 lwz r24,((JB_GPRS+10)*4)(r3)
89 - lfd fp24,((JB_FPRS+10*2)*4)(r3)
90 lwz r25,((JB_GPRS+11)*4)(r3)
91 - lfd fp25,((JB_FPRS+11*2)*4)(r3)
93 lwz r26,((JB_GPRS+12)*4)(r3)
94 - lfd fp26,((JB_FPRS+12*2)*4)(r3)
95 lwz r27,((JB_GPRS+13)*4)(r3)
96 - lfd fp27,((JB_FPRS+13*2)*4)(r3)
97 lwz r28,((JB_GPRS+14)*4)(r3)
98 - lfd fp28,((JB_FPRS+14*2)*4)(r3)
99 lwz r29,((JB_GPRS+15)*4)(r3)
100 - lfd fp29,((JB_FPRS+15*2)*4)(r3)
101 lwz r30,((JB_GPRS+16)*4)(r3)
102 - lfd fp30,((JB_FPRS+16*2)*4)(r3)
103 lwz r31,((JB_GPRS+17)*4)(r3)
104 - lfd fp31,((JB_FPRS+17*2)*4)(r3)
107 END (BP_SYM (__longjmp))
108 diff -Naur glibc-2.2.5.old/sysdeps/powerpc/bits/setjmp.h glibc-2.2.5/sysdeps/powerpc/bits/setjmp.h
109 --- glibc-2.2.5.old/sysdeps/powerpc/bits/setjmp.h Thu Jul 5 21:56:01 2001
110 +++ glibc-2.2.5/sysdeps/powerpc/bits/setjmp.h Thu Jul 10 11:43:17 2003
114 /* Define the machine-dependent type `jmp_buf'. PowerPC version. */
115 +/* For processors without floating point. */
118 # error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
120 # define JB_LR 2 /* The address we will return to */
121 # define JB_GPRS 3 /* GPRs 14 through 31 are saved, 18 in total */
122 # define JB_CR 21 /* Condition code registers. */
123 -# define JB_FPRS 22 /* FPRs 14 through 31 are saved, 18*2 words total */
124 -# define JB_SIZE (58*4)
125 +# define JB_SIZE (22*4)
129 -typedef long int __jmp_buf[58];
130 +typedef long int __jmp_buf[22];
133 /* Test if longjmp to JMPBUF would unwind the frame
134 diff -Naur glibc-2.2.5.old/sysdeps/powerpc/fclrexcpt.c glibc-2.2.5/sysdeps/powerpc/fclrexcpt.c
135 --- glibc-2.2.5.old/sysdeps/powerpc/fclrexcpt.c Thu Jul 5 21:56:01 2001
136 +++ glibc-2.2.5/sysdeps/powerpc/fclrexcpt.c Wed Dec 31 16:00:00 1969
138 -/* Clear given exceptions in current floating-point environment.
139 - Copyright (C) 1997,99,2000,01 Free Software Foundation, Inc.
140 - This file is part of the GNU C Library.
142 - The GNU C Library is free software; you can redistribute it and/or
143 - modify it under the terms of the GNU Lesser General Public
144 - License as published by the Free Software Foundation; either
145 - version 2.1 of the License, or (at your option) any later version.
147 - The GNU C Library is distributed in the hope that it will be useful,
148 - but WITHOUT ANY WARRANTY; without even the implied warranty of
149 - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
150 - Lesser General Public License for more details.
152 - You should have received a copy of the GNU Lesser General Public
153 - License along with the GNU C Library; if not, write to the Free
154 - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
157 -#include <fenv_libc.h>
159 -#undef feclearexcept
161 -__feclearexcept (int excepts)
165 - /* Get the current state. */
166 - u.fenv = fegetenv_register ();
168 - /* Clear the relevant bits. */
169 - u.l[1] = u.l[1] & ~((-(excepts >> (31 - FPSCR_VX) & 1) & FE_ALL_INVALID)
170 - | (excepts & FPSCR_STICKY_BITS));
172 - /* Put the new state in effect. */
173 - fesetenv_register (u.fenv);
179 -#include <shlib-compat.h>
180 -#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2)
181 -strong_alias (__feclearexcept, __old_feclearexcept)
182 -compat_symbol (libm, __old_feclearexcept, feclearexcept, GLIBC_2_1);
185 -versioned_symbol (libm, __feclearexcept, feclearexcept, GLIBC_2_2);
186 diff -Naur glibc-2.2.5.old/sysdeps/powerpc/fe_nomask.c glibc-2.2.5/sysdeps/powerpc/fe_nomask.c
187 --- glibc-2.2.5.old/sysdeps/powerpc/fe_nomask.c Thu Jul 5 21:56:01 2001
188 +++ glibc-2.2.5/sysdeps/powerpc/fe_nomask.c Wed Dec 31 16:00:00 1969
190 -/* Procedure definition for FE_NOMASK_ENV.
191 - Copyright (C) 1997 Free Software Foundation, Inc.
192 - This file is part of the GNU C Library.
194 - The GNU C Library is free software; you can redistribute it and/or
195 - modify it under the terms of the GNU Lesser General Public
196 - License as published by the Free Software Foundation; either
197 - version 2.1 of the License, or (at your option) any later version.
199 - The GNU C Library is distributed in the hope that it will be useful,
200 - but WITHOUT ANY WARRANTY; without even the implied warranty of
201 - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
202 - Lesser General Public License for more details.
204 - You should have received a copy of the GNU Lesser General Public
205 - License along with the GNU C Library; if not, write to the Free
206 - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
212 -/* This is presently a stub, until it's decided how the kernels should
216 -__fe_nomask_env(void)
218 - __set_errno (ENOSYS);
219 - return FE_ENABLED_ENV;
221 -stub_warning (__fe_nomask_env)
222 diff -Naur glibc-2.2.5.old/sysdeps/powerpc/fprrest.S glibc-2.2.5/sysdeps/powerpc/fprrest.S
223 --- glibc-2.2.5.old/sysdeps/powerpc/fprrest.S Thu Jul 5 21:56:01 2001
224 +++ glibc-2.2.5/sysdeps/powerpc/fprrest.S Wed Dec 31 16:00:00 1969
226 -/* Copyright (C) 2000, 2001 Free Software Foundation, Inc.
227 - This file is part of the GNU C Library.
229 - The GNU C Library is free software; you can redistribute it and/or
230 - modify it under the terms of the GNU Lesser General Public
231 - License as published by the Free Software Foundation; either
232 - version 2.1 of the License, or (at your option) any later version.
234 - The GNU C Library is distributed in the hope that it will be useful,
235 - but WITHOUT ANY WARRANTY; without even the implied warranty of
236 - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
237 - Lesser General Public License for more details.
239 - You should have received a copy of the GNU Lesser General Public
240 - License along with the GNU C Library; if not, write to the Free
241 - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
245 - Floating Point Registers (FPRs) restore routine
251 - ASM_GLOBAL_DIRECTIVE C_TEXT(_restf14)
252 - ASM_GLOBAL_DIRECTIVE C_TEXT(_restfpr_14)
254 -C_TEXT(_restfpr_14): lfd fp14,-144(r1)
255 - ASM_GLOBAL_DIRECTIVE C_TEXT(_restf15)
256 - ASM_GLOBAL_DIRECTIVE C_TEXT(_restfpr_15)
258 -C_TEXT(_restfpr_15): lfd fp15,-136(r1)
259 - ASM_GLOBAL_DIRECTIVE C_TEXT(_restf16)
260 - ASM_GLOBAL_DIRECTIVE C_TEXT(_restfpr_16)
262 -C_TEXT(_restfpr_16): lfd fp16,-128(r1)
263 - ASM_GLOBAL_DIRECTIVE C_TEXT(_restf17)
264 - ASM_GLOBAL_DIRECTIVE C_TEXT(_restfpr_17)
266 -C_TEXT(_restfpr_17): lfd fp17,-120(r1)
267 - ASM_GLOBAL_DIRECTIVE C_TEXT(_restf18)
268 - ASM_GLOBAL_DIRECTIVE C_TEXT(_restfpr_18)
270 -C_TEXT(_restfpr_18): lfd fp18,-112(r1)
271 - ASM_GLOBAL_DIRECTIVE C_TEXT(_restf19)
272 - ASM_GLOBAL_DIRECTIVE C_TEXT(_restfpr_19)
274 -C_TEXT(_restfpr_19): lfd fp19,-104(r1)
275 - ASM_GLOBAL_DIRECTIVE C_TEXT(_restf20)
276 - ASM_GLOBAL_DIRECTIVE C_TEXT(_restfpr_20)
278 -C_TEXT(_restfpr_20): lfd fp20,-96(r1)
279 - ASM_GLOBAL_DIRECTIVE C_TEXT(_restf21)
280 - ASM_GLOBAL_DIRECTIVE C_TEXT(_restfpr_21)
282 -C_TEXT(_restfpr_21): lfd fp21,-88(r1)
283 - ASM_GLOBAL_DIRECTIVE C_TEXT(_restf22)
284 - ASM_GLOBAL_DIRECTIVE C_TEXT(_restfpr_22)
286 -C_TEXT(_restfpr_22): lfd fp22,-80(r1)
287 - ASM_GLOBAL_DIRECTIVE C_TEXT(_restf23)
288 - ASM_GLOBAL_DIRECTIVE C_TEXT(_restfpr_23)
290 -C_TEXT(_restfpr_23): lfd fp23,-72(r1)
291 - ASM_GLOBAL_DIRECTIVE C_TEXT(_restf24)
292 - ASM_GLOBAL_DIRECTIVE C_TEXT(_restfpr_24)
294 -C_TEXT(_restfpr_24): lfd fp24,-64(r1)
295 - ASM_GLOBAL_DIRECTIVE C_TEXT(_restf25)
296 - ASM_GLOBAL_DIRECTIVE C_TEXT(_restfpr_25)
298 -C_TEXT(_restfpr_25): lfd fp25,-56(r1)
299 - ASM_GLOBAL_DIRECTIVE C_TEXT(_restf26)
300 - ASM_GLOBAL_DIRECTIVE C_TEXT(_restfpr_26)
302 -C_TEXT(_restfpr_26): lfd fp26,-48(r1)
303 - ASM_GLOBAL_DIRECTIVE C_TEXT(_restf27)
304 - ASM_GLOBAL_DIRECTIVE C_TEXT(_restfpr_27)
306 -C_TEXT(_restfpr_27): lfd fp27,-40(r1)
307 - ASM_GLOBAL_DIRECTIVE C_TEXT(_restf28)
308 - ASM_GLOBAL_DIRECTIVE C_TEXT(_restfpr_28)
310 -C_TEXT(_restfpr_28): lfd fp28,-32(r1)
311 - ASM_GLOBAL_DIRECTIVE C_TEXT(_restf29)
312 - ASM_GLOBAL_DIRECTIVE C_TEXT(_restfpr_29)
314 -C_TEXT(_restfpr_29): lwz r0,8(r1) #get return address from frame
315 - lfd fp29,-24(r1) #restore f29
316 - mtlr r0 #move return address to LR
317 - lfd fp30,-16(r1) #restore f30
318 - lfd fp31,-8(r1) #restore f31
320 diff -Naur glibc-2.2.5.old/sysdeps/powerpc/fprsave.S glibc-2.2.5/sysdeps/powerpc/fprsave.S
321 --- glibc-2.2.5.old/sysdeps/powerpc/fprsave.S Thu Jul 5 21:56:01 2001
322 +++ glibc-2.2.5/sysdeps/powerpc/fprsave.S Wed Dec 31 16:00:00 1969
324 -/* Copyright (C) 2000, 2001 Free Software Foundation, Inc.
325 - This file is part of the GNU C Library.
327 - The GNU C Library is free software; you can redistribute it and/or
328 - modify it under the terms of the GNU Lesser General Public
329 - License as published by the Free Software Foundation; either
330 - version 2.1 of the License, or (at your option) any later version.
332 - The GNU C Library is distributed in the hope that it will be useful,
333 - but WITHOUT ANY WARRANTY; without even the implied warranty of
334 - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
335 - Lesser General Public License for more details.
337 - You should have received a copy of the GNU Lesser General Public
338 - License along with the GNU C Library; if not, write to the Free
339 - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
343 - Floating Point Registers (FPRs) save routine
349 - ASM_GLOBAL_DIRECTIVE C_TEXT(_savef14)
350 - ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_14)
352 -C_TEXT(_savefpr_14): stfd fp14,-144(r1)
353 - ASM_GLOBAL_DIRECTIVE C_TEXT(_savef15)
354 - ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_15)
356 -C_TEXT(_savefpr_15): stfd fp15,-136(r1)
357 - ASM_GLOBAL_DIRECTIVE C_TEXT(_savef16)
358 - ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_16)
360 -C_TEXT(_savefpr_16): stfd fp16,-128(r1)
361 - ASM_GLOBAL_DIRECTIVE C_TEXT(_savef17)
362 - ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_17)
364 -C_TEXT(_savefpr_17): stfd fp17,-120(r1)
365 - ASM_GLOBAL_DIRECTIVE C_TEXT(_savef18)
366 - ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_18)
368 -C_TEXT(_savefpr_18): stfd fp18,-112(r1)
369 - ASM_GLOBAL_DIRECTIVE C_TEXT(_savef19)
370 - ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_19)
372 -C_TEXT(_savefpr_19): stfd fp19,-104(r1)
373 - ASM_GLOBAL_DIRECTIVE C_TEXT(_savef20)
374 - ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_20)
376 -C_TEXT(_savefpr_20): stfd fp20,-96(r1)
377 - ASM_GLOBAL_DIRECTIVE C_TEXT(_savef21)
378 - ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_21)
380 -C_TEXT(_savefpr_21): stfd fp21,-88(r1)
381 - ASM_GLOBAL_DIRECTIVE C_TEXT(_savef22)
382 - ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_22)
384 -C_TEXT(_savefpr_22): stfd fp22,-80(r1)
385 - ASM_GLOBAL_DIRECTIVE C_TEXT(_savef23)
386 - ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_23)
388 -C_TEXT(_savefpr_23): stfd fp23,-72(r1)
389 - ASM_GLOBAL_DIRECTIVE C_TEXT(_savef24)
390 - ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_24)
392 -C_TEXT(_savefpr_24): stfd fp24,-64(r1)
393 - ASM_GLOBAL_DIRECTIVE C_TEXT(_savef25)
394 - ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_25)
396 -C_TEXT(_savefpr_25): stfd fp25,-56(r1)
397 - ASM_GLOBAL_DIRECTIVE C_TEXT(_savef26)
398 - ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_26)
400 -C_TEXT(_savefpr_26): stfd fp26,-48(r1)
401 - ASM_GLOBAL_DIRECTIVE C_TEXT(_savef27)
402 - ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_27)
404 -C_TEXT(_savefpr_27): stfd fp27,-40(r1)
405 - ASM_GLOBAL_DIRECTIVE C_TEXT(_savef28)
406 - ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_28)
408 -C_TEXT(_savefpr_28): stfd fp28,-32(r1)
409 - ASM_GLOBAL_DIRECTIVE C_TEXT(_savef29)
410 - ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_29)
412 -C_TEXT(_savefpr_29): stfd fp29,-24(r1) #save f29
413 - stfd fp30,-16(r1) #save f30
414 - stfd fp31,-8(r1) #save f31
415 - stw r0,8(r1) #save LR in callers frame
417 diff -Naur glibc-2.2.5.old/sysdeps/powerpc/fpu/Dist glibc-2.2.5/sysdeps/powerpc/fpu/Dist
418 --- glibc-2.2.5.old/sysdeps/powerpc/fpu/Dist Wed Jan 26 17:48:02 2000
419 +++ glibc-2.2.5/sysdeps/powerpc/fpu/Dist Thu Jul 10 11:43:17 2003
427 diff -Naur glibc-2.2.5.old/sysdeps/powerpc/fpu/Makefile glibc-2.2.5/sysdeps/powerpc/fpu/Makefile
428 --- glibc-2.2.5.old/sysdeps/powerpc/fpu/Makefile Mon Oct 11 15:29:00 1999
429 +++ glibc-2.2.5/sysdeps/powerpc/fpu/Makefile Thu Jul 10 11:43:17 2003
431 ifeq ($(subdir),math)
432 libm-support += fenv_const fe_nomask t_sqrt
435 +ifeq ($(subdir),misc)
436 +sysdep_routines += fprsave fprrest
438 diff -Naur glibc-2.2.5.old/sysdeps/powerpc/fpu/Versions glibc-2.2.5/sysdeps/powerpc/fpu/Versions
439 --- glibc-2.2.5.old/sysdeps/powerpc/fpu/Versions Wed Dec 31 16:00:00 1969
440 +++ glibc-2.2.5/sysdeps/powerpc/fpu/Versions Thu Jul 10 11:43:17 2003
444 + # symbols used in macros from sysdeps/powerpc/bits/fenv.h
445 + __fe_dfl_env; __fe_enabled_env; __fe_nonieee_env; __fe_nomask_env;
448 diff -Naur glibc-2.2.5.old/sysdeps/powerpc/fpu/__longjmp.S glibc-2.2.5/sysdeps/powerpc/fpu/__longjmp.S
449 --- glibc-2.2.5.old/sysdeps/powerpc/fpu/__longjmp.S Wed Dec 31 16:00:00 1969
450 +++ glibc-2.2.5/sysdeps/powerpc/fpu/__longjmp.S Thu Jul 10 11:43:17 2003
452 +/* longjmp for PowerPC.
453 + Copyright (C) 1995, 1996, 1997, 1999, 2000 Free Software Foundation, Inc.
454 + This file is part of the GNU C Library.
456 + The GNU C Library is free software; you can redistribute it and/or
457 + modify it under the terms of the GNU Library General Public License as
458 + published by the Free Software Foundation; either version 2 of the
459 + License, or (at your option) any later version.
461 + The GNU C Library is distributed in the hope that it will be useful,
462 + but WITHOUT ANY WARRANTY; without even the implied warranty of
463 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
464 + Library General Public License for more details.
466 + You should have received a copy of the GNU Library General Public
467 + License along with the GNU C Library; see the file COPYING.LIB. If not,
468 + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
469 + Boston, MA 02111-1307, USA. */
474 +#include <bits/setjmp.h>
478 +ENTRY (BP_SYM (__longjmp))
479 + CHECK_BOUNDS_BOTH_WIDE_LIT (r3, r8, r9, JB_SIZE)
481 + lwz r1,(JB_GPR1*4)(r3)
482 + lwz r2,(JB_GPR2*4)(r3)
483 + lwz r0,(JB_LR*4)(r3)
484 + lwz r14,((JB_GPRS+0)*4)(r3)
485 + lfd fp14,((JB_FPRS+0*2)*4)(r3)
486 + lwz r15,((JB_GPRS+1)*4)(r3)
487 + lfd fp15,((JB_FPRS+1*2)*4)(r3)
488 + lwz r16,((JB_GPRS+2)*4)(r3)
489 + lfd fp16,((JB_FPRS+2*2)*4)(r3)
490 + lwz r17,((JB_GPRS+3)*4)(r3)
491 + lfd fp17,((JB_FPRS+3*2)*4)(r3)
492 + lwz r18,((JB_GPRS+4)*4)(r3)
493 + lfd fp18,((JB_FPRS+4*2)*4)(r3)
494 + lwz r19,((JB_GPRS+5)*4)(r3)
495 + lfd fp19,((JB_FPRS+5*2)*4)(r3)
496 + lwz r20,((JB_GPRS+6)*4)(r3)
497 + lfd fp20,((JB_FPRS+6*2)*4)(r3)
499 + lwz r21,((JB_GPRS+7)*4)(r3)
500 + lfd fp21,((JB_FPRS+7*2)*4)(r3)
501 + lwz r22,((JB_GPRS+8)*4)(r3)
502 + lfd fp22,((JB_FPRS+8*2)*4)(r3)
503 + lwz r0,(JB_CR*4)(r3)
504 + lwz r23,((JB_GPRS+9)*4)(r3)
505 + lfd fp23,((JB_FPRS+9*2)*4)(r3)
506 + lwz r24,((JB_GPRS+10)*4)(r3)
507 + lfd fp24,((JB_FPRS+10*2)*4)(r3)
508 + lwz r25,((JB_GPRS+11)*4)(r3)
509 + lfd fp25,((JB_FPRS+11*2)*4)(r3)
511 + lwz r26,((JB_GPRS+12)*4)(r3)
512 + lfd fp26,((JB_FPRS+12*2)*4)(r3)
513 + lwz r27,((JB_GPRS+13)*4)(r3)
514 + lfd fp27,((JB_FPRS+13*2)*4)(r3)
515 + lwz r28,((JB_GPRS+14)*4)(r3)
516 + lfd fp28,((JB_FPRS+14*2)*4)(r3)
517 + lwz r29,((JB_GPRS+15)*4)(r3)
518 + lfd fp29,((JB_FPRS+15*2)*4)(r3)
519 + lwz r30,((JB_GPRS+16)*4)(r3)
520 + lfd fp30,((JB_FPRS+16*2)*4)(r3)
521 + lwz r31,((JB_GPRS+17)*4)(r3)
522 + lfd fp31,((JB_FPRS+17*2)*4)(r3)
525 +END (BP_SYM (__longjmp))
526 diff -Naur glibc-2.2.5.old/sysdeps/powerpc/fpu/bits/setjmp.h glibc-2.2.5/sysdeps/powerpc/fpu/bits/setjmp.h
527 --- glibc-2.2.5.old/sysdeps/powerpc/fpu/bits/setjmp.h Wed Dec 31 16:00:00 1969
528 +++ glibc-2.2.5/sysdeps/powerpc/fpu/bits/setjmp.h Thu Jul 10 11:43:17 2003
530 +/* Copyright (C) 1997, 1998, 2000 Free Software Foundation, Inc.
531 + This file is part of the GNU C Library.
533 + The GNU C Library is free software; you can redistribute it and/or
534 + modify it under the terms of the GNU Library General Public License as
535 + published by the Free Software Foundation; either version 2 of the
536 + License, or (at your option) any later version.
538 + The GNU C Library is distributed in the hope that it will be useful,
539 + but WITHOUT ANY WARRANTY; without even the implied warranty of
540 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
541 + Library General Public License for more details.
543 + You should have received a copy of the GNU Library General Public
544 + License along with the GNU C Library; see the file COPYING.LIB. If not,
545 + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
546 + Boston, MA 02111-1307, USA. */
548 +/* Define the machine-dependent type `jmp_buf'. PowerPC version. */
551 +# error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
554 +/* The previous bits/setjmp.h had __jmp_buf defined as a structure.
555 + We use an array of 'long int' instead, to make writing the
556 + assembler easier. Naturally, user code should not depend on
557 + either representation. */
559 +#if defined __USE_MISC || defined _ASM
560 +# define JB_GPR1 0 /* Also known as the stack pointer */
562 +# define JB_LR 2 /* The address we will return to */
563 +# define JB_GPRS 3 /* GPRs 14 through 31 are saved, 18 in total */
564 +# define JB_CR 21 /* Condition code registers. */
565 +# define JB_FPRS 22 /* FPRs 14 through 31 are saved, 18*2 words total */
566 +# define JB_SIZE (58*4)
570 +typedef long int __jmp_buf[58];
573 +/* Test if longjmp to JMPBUF would unwind the frame
574 + containing a local variable at ADDRESS. */
575 +#define _JMPBUF_UNWINDS(jmpbuf, address) \
576 + ((void *) (address) < (void *) (jmpbuf)[JB_GPR1])
577 diff -Naur glibc-2.2.5.old/sysdeps/powerpc/fpu/fclrexcpt.c glibc-2.2.5/sysdeps/powerpc/fpu/fclrexcpt.c
578 --- glibc-2.2.5.old/sysdeps/powerpc/fpu/fclrexcpt.c Wed Dec 31 16:00:00 1969
579 +++ glibc-2.2.5/sysdeps/powerpc/fpu/fclrexcpt.c Thu Jul 5 21:56:01 2001
581 +/* Clear given exceptions in current floating-point environment.
582 + Copyright (C) 1997,99,2000,01 Free Software Foundation, Inc.
583 + This file is part of the GNU C Library.
585 + The GNU C Library is free software; you can redistribute it and/or
586 + modify it under the terms of the GNU Lesser General Public
587 + License as published by the Free Software Foundation; either
588 + version 2.1 of the License, or (at your option) any later version.
590 + The GNU C Library is distributed in the hope that it will be useful,
591 + but WITHOUT ANY WARRANTY; without even the implied warranty of
592 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
593 + Lesser General Public License for more details.
595 + You should have received a copy of the GNU Lesser General Public
596 + License along with the GNU C Library; if not, write to the Free
597 + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
600 +#include <fenv_libc.h>
602 +#undef feclearexcept
604 +__feclearexcept (int excepts)
608 + /* Get the current state. */
609 + u.fenv = fegetenv_register ();
611 + /* Clear the relevant bits. */
612 + u.l[1] = u.l[1] & ~((-(excepts >> (31 - FPSCR_VX) & 1) & FE_ALL_INVALID)
613 + | (excepts & FPSCR_STICKY_BITS));
615 + /* Put the new state in effect. */
616 + fesetenv_register (u.fenv);
622 +#include <shlib-compat.h>
623 +#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2)
624 +strong_alias (__feclearexcept, __old_feclearexcept)
625 +compat_symbol (libm, __old_feclearexcept, feclearexcept, GLIBC_2_1);
628 +versioned_symbol (libm, __feclearexcept, feclearexcept, GLIBC_2_2);
629 diff -Naur glibc-2.2.5.old/sysdeps/powerpc/fpu/fe_nomask.c glibc-2.2.5/sysdeps/powerpc/fpu/fe_nomask.c
630 --- glibc-2.2.5.old/sysdeps/powerpc/fpu/fe_nomask.c Wed Dec 31 16:00:00 1969
631 +++ glibc-2.2.5/sysdeps/powerpc/fpu/fe_nomask.c Thu Jul 5 21:56:01 2001
633 +/* Procedure definition for FE_NOMASK_ENV.
634 + Copyright (C) 1997 Free Software Foundation, Inc.
635 + This file is part of the GNU C Library.
637 + The GNU C Library is free software; you can redistribute it and/or
638 + modify it under the terms of the GNU Lesser General Public
639 + License as published by the Free Software Foundation; either
640 + version 2.1 of the License, or (at your option) any later version.
642 + The GNU C Library is distributed in the hope that it will be useful,
643 + but WITHOUT ANY WARRANTY; without even the implied warranty of
644 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
645 + Lesser General Public License for more details.
647 + You should have received a copy of the GNU Lesser General Public
648 + License along with the GNU C Library; if not, write to the Free
649 + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
655 +/* This is presently a stub, until it's decided how the kernels should
659 +__fe_nomask_env(void)
661 + __set_errno (ENOSYS);
662 + return FE_ENABLED_ENV;
664 +stub_warning (__fe_nomask_env)
665 diff -Naur glibc-2.2.5.old/sysdeps/powerpc/fpu/fprrest.S glibc-2.2.5/sysdeps/powerpc/fpu/fprrest.S
666 --- glibc-2.2.5.old/sysdeps/powerpc/fpu/fprrest.S Wed Dec 31 16:00:00 1969
667 +++ glibc-2.2.5/sysdeps/powerpc/fpu/fprrest.S Thu Jul 5 21:56:01 2001
669 +/* Copyright (C) 2000, 2001 Free Software Foundation, Inc.
670 + This file is part of the GNU C Library.
672 + The GNU C Library is free software; you can redistribute it and/or
673 + modify it under the terms of the GNU Lesser General Public
674 + License as published by the Free Software Foundation; either
675 + version 2.1 of the License, or (at your option) any later version.
677 + The GNU C Library is distributed in the hope that it will be useful,
678 + but WITHOUT ANY WARRANTY; without even the implied warranty of
679 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
680 + Lesser General Public License for more details.
682 + You should have received a copy of the GNU Lesser General Public
683 + License along with the GNU C Library; if not, write to the Free
684 + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
688 + Floating Point Registers (FPRs) restore routine
694 + ASM_GLOBAL_DIRECTIVE C_TEXT(_restf14)
695 + ASM_GLOBAL_DIRECTIVE C_TEXT(_restfpr_14)
697 +C_TEXT(_restfpr_14): lfd fp14,-144(r1)
698 + ASM_GLOBAL_DIRECTIVE C_TEXT(_restf15)
699 + ASM_GLOBAL_DIRECTIVE C_TEXT(_restfpr_15)
701 +C_TEXT(_restfpr_15): lfd fp15,-136(r1)
702 + ASM_GLOBAL_DIRECTIVE C_TEXT(_restf16)
703 + ASM_GLOBAL_DIRECTIVE C_TEXT(_restfpr_16)
705 +C_TEXT(_restfpr_16): lfd fp16,-128(r1)
706 + ASM_GLOBAL_DIRECTIVE C_TEXT(_restf17)
707 + ASM_GLOBAL_DIRECTIVE C_TEXT(_restfpr_17)
709 +C_TEXT(_restfpr_17): lfd fp17,-120(r1)
710 + ASM_GLOBAL_DIRECTIVE C_TEXT(_restf18)
711 + ASM_GLOBAL_DIRECTIVE C_TEXT(_restfpr_18)
713 +C_TEXT(_restfpr_18): lfd fp18,-112(r1)
714 + ASM_GLOBAL_DIRECTIVE C_TEXT(_restf19)
715 + ASM_GLOBAL_DIRECTIVE C_TEXT(_restfpr_19)
717 +C_TEXT(_restfpr_19): lfd fp19,-104(r1)
718 + ASM_GLOBAL_DIRECTIVE C_TEXT(_restf20)
719 + ASM_GLOBAL_DIRECTIVE C_TEXT(_restfpr_20)
721 +C_TEXT(_restfpr_20): lfd fp20,-96(r1)
722 + ASM_GLOBAL_DIRECTIVE C_TEXT(_restf21)
723 + ASM_GLOBAL_DIRECTIVE C_TEXT(_restfpr_21)
725 +C_TEXT(_restfpr_21): lfd fp21,-88(r1)
726 + ASM_GLOBAL_DIRECTIVE C_TEXT(_restf22)
727 + ASM_GLOBAL_DIRECTIVE C_TEXT(_restfpr_22)
729 +C_TEXT(_restfpr_22): lfd fp22,-80(r1)
730 + ASM_GLOBAL_DIRECTIVE C_TEXT(_restf23)
731 + ASM_GLOBAL_DIRECTIVE C_TEXT(_restfpr_23)
733 +C_TEXT(_restfpr_23): lfd fp23,-72(r1)
734 + ASM_GLOBAL_DIRECTIVE C_TEXT(_restf24)
735 + ASM_GLOBAL_DIRECTIVE C_TEXT(_restfpr_24)
737 +C_TEXT(_restfpr_24): lfd fp24,-64(r1)
738 + ASM_GLOBAL_DIRECTIVE C_TEXT(_restf25)
739 + ASM_GLOBAL_DIRECTIVE C_TEXT(_restfpr_25)
741 +C_TEXT(_restfpr_25): lfd fp25,-56(r1)
742 + ASM_GLOBAL_DIRECTIVE C_TEXT(_restf26)
743 + ASM_GLOBAL_DIRECTIVE C_TEXT(_restfpr_26)
745 +C_TEXT(_restfpr_26): lfd fp26,-48(r1)
746 + ASM_GLOBAL_DIRECTIVE C_TEXT(_restf27)
747 + ASM_GLOBAL_DIRECTIVE C_TEXT(_restfpr_27)
749 +C_TEXT(_restfpr_27): lfd fp27,-40(r1)
750 + ASM_GLOBAL_DIRECTIVE C_TEXT(_restf28)
751 + ASM_GLOBAL_DIRECTIVE C_TEXT(_restfpr_28)
753 +C_TEXT(_restfpr_28): lfd fp28,-32(r1)
754 + ASM_GLOBAL_DIRECTIVE C_TEXT(_restf29)
755 + ASM_GLOBAL_DIRECTIVE C_TEXT(_restfpr_29)
757 +C_TEXT(_restfpr_29): lwz r0,8(r1) #get return address from frame
758 + lfd fp29,-24(r1) #restore f29
759 + mtlr r0 #move return address to LR
760 + lfd fp30,-16(r1) #restore f30
761 + lfd fp31,-8(r1) #restore f31
763 diff -Naur glibc-2.2.5.old/sysdeps/powerpc/fpu/fprsave.S glibc-2.2.5/sysdeps/powerpc/fpu/fprsave.S
764 --- glibc-2.2.5.old/sysdeps/powerpc/fpu/fprsave.S Wed Dec 31 16:00:00 1969
765 +++ glibc-2.2.5/sysdeps/powerpc/fpu/fprsave.S Thu Jul 5 21:56:01 2001
767 +/* Copyright (C) 2000, 2001 Free Software Foundation, Inc.
768 + This file is part of the GNU C Library.
770 + The GNU C Library is free software; you can redistribute it and/or
771 + modify it under the terms of the GNU Lesser General Public
772 + License as published by the Free Software Foundation; either
773 + version 2.1 of the License, or (at your option) any later version.
775 + The GNU C Library is distributed in the hope that it will be useful,
776 + but WITHOUT ANY WARRANTY; without even the implied warranty of
777 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
778 + Lesser General Public License for more details.
780 + You should have received a copy of the GNU Lesser General Public
781 + License along with the GNU C Library; if not, write to the Free
782 + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
786 + Floating Point Registers (FPRs) save routine
792 + ASM_GLOBAL_DIRECTIVE C_TEXT(_savef14)
793 + ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_14)
795 +C_TEXT(_savefpr_14): stfd fp14,-144(r1)
796 + ASM_GLOBAL_DIRECTIVE C_TEXT(_savef15)
797 + ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_15)
799 +C_TEXT(_savefpr_15): stfd fp15,-136(r1)
800 + ASM_GLOBAL_DIRECTIVE C_TEXT(_savef16)
801 + ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_16)
803 +C_TEXT(_savefpr_16): stfd fp16,-128(r1)
804 + ASM_GLOBAL_DIRECTIVE C_TEXT(_savef17)
805 + ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_17)
807 +C_TEXT(_savefpr_17): stfd fp17,-120(r1)
808 + ASM_GLOBAL_DIRECTIVE C_TEXT(_savef18)
809 + ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_18)
811 +C_TEXT(_savefpr_18): stfd fp18,-112(r1)
812 + ASM_GLOBAL_DIRECTIVE C_TEXT(_savef19)
813 + ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_19)
815 +C_TEXT(_savefpr_19): stfd fp19,-104(r1)
816 + ASM_GLOBAL_DIRECTIVE C_TEXT(_savef20)
817 + ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_20)
819 +C_TEXT(_savefpr_20): stfd fp20,-96(r1)
820 + ASM_GLOBAL_DIRECTIVE C_TEXT(_savef21)
821 + ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_21)
823 +C_TEXT(_savefpr_21): stfd fp21,-88(r1)
824 + ASM_GLOBAL_DIRECTIVE C_TEXT(_savef22)
825 + ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_22)
827 +C_TEXT(_savefpr_22): stfd fp22,-80(r1)
828 + ASM_GLOBAL_DIRECTIVE C_TEXT(_savef23)
829 + ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_23)
831 +C_TEXT(_savefpr_23): stfd fp23,-72(r1)
832 + ASM_GLOBAL_DIRECTIVE C_TEXT(_savef24)
833 + ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_24)
835 +C_TEXT(_savefpr_24): stfd fp24,-64(r1)
836 + ASM_GLOBAL_DIRECTIVE C_TEXT(_savef25)
837 + ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_25)
839 +C_TEXT(_savefpr_25): stfd fp25,-56(r1)
840 + ASM_GLOBAL_DIRECTIVE C_TEXT(_savef26)
841 + ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_26)
843 +C_TEXT(_savefpr_26): stfd fp26,-48(r1)
844 + ASM_GLOBAL_DIRECTIVE C_TEXT(_savef27)
845 + ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_27)
847 +C_TEXT(_savefpr_27): stfd fp27,-40(r1)
848 + ASM_GLOBAL_DIRECTIVE C_TEXT(_savef28)
849 + ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_28)
851 +C_TEXT(_savefpr_28): stfd fp28,-32(r1)
852 + ASM_GLOBAL_DIRECTIVE C_TEXT(_savef29)
853 + ASM_GLOBAL_DIRECTIVE C_TEXT(_savefpr_29)
855 +C_TEXT(_savefpr_29): stfd fp29,-24(r1) #save f29
856 + stfd fp30,-16(r1) #save f30
857 + stfd fp31,-8(r1) #save f31
858 + stw r0,8(r1) #save LR in callers frame
860 diff -Naur glibc-2.2.5.old/sysdeps/powerpc/fpu/fpu_control.h glibc-2.2.5/sysdeps/powerpc/fpu/fpu_control.h
861 --- glibc-2.2.5.old/sysdeps/powerpc/fpu/fpu_control.h Wed Dec 31 16:00:00 1969
862 +++ glibc-2.2.5/sysdeps/powerpc/fpu/fpu_control.h Thu Jul 5 21:56:01 2001
864 +/* FPU control word definitions. PowerPC version.
865 + Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
866 + This file is part of the GNU C Library.
868 + The GNU C Library is free software; you can redistribute it and/or
869 + modify it under the terms of the GNU Lesser General Public
870 + License as published by the Free Software Foundation; either
871 + version 2.1 of the License, or (at your option) any later version.
873 + The GNU C Library is distributed in the hope that it will be useful,
874 + but WITHOUT ANY WARRANTY; without even the implied warranty of
875 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
876 + Lesser General Public License for more details.
878 + You should have received a copy of the GNU Lesser General Public
879 + License along with the GNU C Library; if not, write to the Free
880 + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
883 +#ifndef _FPU_CONTROL_H
884 +#define _FPU_CONTROL_H
886 +/* rounding control */
887 +#define _FPU_RC_NEAREST 0x00 /* RECOMMENDED */
888 +#define _FPU_RC_DOWN 0x03
889 +#define _FPU_RC_UP 0x02
890 +#define _FPU_RC_ZERO 0x01
892 +#define _FPU_MASK_NI 0x04 /* non-ieee mode */
894 +/* masking of interrupts */
895 +#define _FPU_MASK_ZM 0x10 /* zero divide */
896 +#define _FPU_MASK_OM 0x40 /* overflow */
897 +#define _FPU_MASK_UM 0x20 /* underflow */
898 +#define _FPU_MASK_XM 0x08 /* inexact */
899 +#define _FPU_MASK_IM 0x80 /* invalid operation */
901 +#define _FPU_RESERVED 0xffffff00 /* These bits are reserved are not changed. */
903 +/* The fdlibm code requires no interrupts for exceptions. */
904 +#define _FPU_DEFAULT 0x00000000 /* Default value. */
906 +/* IEEE: same as above, but (some) exceptions;
907 + we leave the 'inexact' exception off.
909 +#define _FPU_IEEE 0x000000f0
911 +/* Type of the control word. */
912 +typedef unsigned int fpu_control_t __attribute__ ((__mode__ (__SI__)));
914 +/* Macros for accessing the hardware control word. */
915 +#define _FPU_GETCW(cw) ( { \
916 + union { double d; fpu_control_t cw[2]; } tmp __attribute__ ((__aligned__(8))); \
917 + __asm__ ("mffs 0; stfd%U0 0,%0" : "=m" (tmp.d) : : "fr0"); \
920 +#define _FPU_SETCW(cw) { \
921 + union { double d; fpu_control_t cw[2]; } tmp __attribute__ ((__aligned__(8))); \
922 + tmp.cw[0] = 0xFFF80000; /* More-or-less arbitrary; this is a QNaN. */ \
924 + __asm__ ("lfd%U0 0,%0; mtfsf 255,0" : : "m" (tmp.d) : "fr0"); \
927 +/* Default control word set at startup. */
928 +extern fpu_control_t __fpu_control;
930 +#endif /* _FPU_CONTROL_H */
931 diff -Naur glibc-2.2.5.old/sysdeps/powerpc/fpu/setjmp.S glibc-2.2.5/sysdeps/powerpc/fpu/setjmp.S
932 --- glibc-2.2.5.old/sysdeps/powerpc/fpu/setjmp.S Wed Dec 31 16:00:00 1969
933 +++ glibc-2.2.5/sysdeps/powerpc/fpu/setjmp.S Thu Jul 10 11:43:44 2003
935 +/* setjmp for PowerPC.
936 + Copyright (C) 1995, 1996, 1997, 1999, 2000 Free Software Foundation, Inc.
937 + This file is part of the GNU C Library.
939 + The GNU C Library is free software; you can redistribute it and/or
940 + modify it under the terms of the GNU Library General Public License as
941 + published by the Free Software Foundation; either version 2 of the
942 + License, or (at your option) any later version.
944 + The GNU C Library is distributed in the hope that it will be useful,
945 + but WITHOUT ANY WARRANTY; without even the implied warranty of
946 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
947 + Library General Public License for more details.
949 + You should have received a copy of the GNU Library General Public
950 + License along with the GNU C Library; see the file COPYING.LIB. If not,
951 + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
952 + Boston, MA 02111-1307, USA. */
957 +#include <bits/setjmp.h>
961 +ENTRY (BP_SYM (__sigsetjmp))
962 + CHECK_BOUNDS_BOTH_WIDE_LIT (r3, r8, r9, JB_SIZE)
964 + stw r1,(JB_GPR1*4)(3)
966 + stw r2,(JB_GPR2*4)(3)
967 + stw r14,((JB_GPRS+0)*4)(3)
968 + stfd fp14,((JB_FPRS+0*2)*4)(3)
969 + stw r0,(JB_LR*4)(3)
970 + stw r15,((JB_GPRS+1)*4)(3)
971 + stfd fp15,((JB_FPRS+1*2)*4)(3)
973 + stw r16,((JB_GPRS+2)*4)(3)
974 + stfd fp16,((JB_FPRS+2*2)*4)(3)
975 + stw r0,(JB_CR*4)(3)
976 + stw r17,((JB_GPRS+3)*4)(3)
977 + stfd fp17,((JB_FPRS+3*2)*4)(3)
978 + stw r18,((JB_GPRS+4)*4)(3)
979 + stfd fp18,((JB_FPRS+4*2)*4)(3)
980 + stw r19,((JB_GPRS+5)*4)(3)
981 + stfd fp19,((JB_FPRS+5*2)*4)(3)
982 + stw r20,((JB_GPRS+6)*4)(3)
983 + stfd fp20,((JB_FPRS+6*2)*4)(3)
984 + stw r21,((JB_GPRS+7)*4)(3)
985 + stfd fp21,((JB_FPRS+7*2)*4)(3)
986 + stw r22,((JB_GPRS+8)*4)(3)
987 + stfd fp22,((JB_FPRS+8*2)*4)(3)
988 + stw r23,((JB_GPRS+9)*4)(3)
989 + stfd fp23,((JB_FPRS+9*2)*4)(3)
990 + stw r24,((JB_GPRS+10)*4)(3)
991 + stfd fp24,((JB_FPRS+10*2)*4)(3)
992 + stw r25,((JB_GPRS+11)*4)(3)
993 + stfd fp25,((JB_FPRS+11*2)*4)(3)
994 + stw r26,((JB_GPRS+12)*4)(3)
995 + stfd fp26,((JB_FPRS+12*2)*4)(3)
996 + stw r27,((JB_GPRS+13)*4)(3)
997 + stfd fp27,((JB_FPRS+13*2)*4)(3)
998 + stw r28,((JB_GPRS+14)*4)(3)
999 + stfd fp28,((JB_FPRS+14*2)*4)(3)
1000 + stw r29,((JB_GPRS+15)*4)(3)
1001 + stfd fp29,((JB_FPRS+15*2)*4)(3)
1002 + stw r30,((JB_GPRS+16)*4)(3)
1003 + stfd fp30,((JB_FPRS+16*2)*4)(3)
1004 + stw r31,((JB_GPRS+17)*4)(3)
1005 + stfd fp31,((JB_FPRS+17*2)*4)(3)
1006 + b JUMPTARGET (BP_SYM (__sigjmp_save))
1007 +END (BP_SYM (__sigsetjmp))
1008 diff -Naur glibc-2.2.5.old/sysdeps/powerpc/fpu_control.h glibc-2.2.5/sysdeps/powerpc/fpu_control.h
1009 --- glibc-2.2.5.old/sysdeps/powerpc/fpu_control.h Thu Jul 5 21:56:01 2001
1010 +++ glibc-2.2.5/sysdeps/powerpc/fpu_control.h Wed Dec 31 16:00:00 1969
1012 -/* FPU control word definitions. PowerPC version.
1013 - Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
1014 - This file is part of the GNU C Library.
1016 - The GNU C Library is free software; you can redistribute it and/or
1017 - modify it under the terms of the GNU Lesser General Public
1018 - License as published by the Free Software Foundation; either
1019 - version 2.1 of the License, or (at your option) any later version.
1021 - The GNU C Library is distributed in the hope that it will be useful,
1022 - but WITHOUT ANY WARRANTY; without even the implied warranty of
1023 - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1024 - Lesser General Public License for more details.
1026 - You should have received a copy of the GNU Lesser General Public
1027 - License along with the GNU C Library; if not, write to the Free
1028 - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
1029 - 02111-1307 USA. */
1031 -#ifndef _FPU_CONTROL_H
1032 -#define _FPU_CONTROL_H
1034 -/* rounding control */
1035 -#define _FPU_RC_NEAREST 0x00 /* RECOMMENDED */
1036 -#define _FPU_RC_DOWN 0x03
1037 -#define _FPU_RC_UP 0x02
1038 -#define _FPU_RC_ZERO 0x01
1040 -#define _FPU_MASK_NI 0x04 /* non-ieee mode */
1042 -/* masking of interrupts */
1043 -#define _FPU_MASK_ZM 0x10 /* zero divide */
1044 -#define _FPU_MASK_OM 0x40 /* overflow */
1045 -#define _FPU_MASK_UM 0x20 /* underflow */
1046 -#define _FPU_MASK_XM 0x08 /* inexact */
1047 -#define _FPU_MASK_IM 0x80 /* invalid operation */
1049 -#define _FPU_RESERVED 0xffffff00 /* These bits are reserved are not changed. */
1051 -/* The fdlibm code requires no interrupts for exceptions. */
1052 -#define _FPU_DEFAULT 0x00000000 /* Default value. */
1054 -/* IEEE: same as above, but (some) exceptions;
1055 - we leave the 'inexact' exception off.
1057 -#define _FPU_IEEE 0x000000f0
1059 -/* Type of the control word. */
1060 -typedef unsigned int fpu_control_t __attribute__ ((__mode__ (__SI__)));
1062 -/* Macros for accessing the hardware control word. */
1063 -#define _FPU_GETCW(cw) ( { \
1064 - union { double d; fpu_control_t cw[2]; } tmp __attribute__ ((__aligned__(8))); \
1065 - __asm__ ("mffs 0; stfd%U0 0,%0" : "=m" (tmp.d) : : "fr0"); \
1068 -#define _FPU_SETCW(cw) { \
1069 - union { double d; fpu_control_t cw[2]; } tmp __attribute__ ((__aligned__(8))); \
1070 - tmp.cw[0] = 0xFFF80000; /* More-or-less arbitrary; this is a QNaN. */ \
1072 - __asm__ ("lfd%U0 0,%0; mtfsf 255,0" : : "m" (tmp.d) : "fr0"); \
1075 -/* Default control word set at startup. */
1076 -extern fpu_control_t __fpu_control;
1078 -#endif /* _FPU_CONTROL_H */
1079 diff -Naur glibc-2.2.5.old/sysdeps/powerpc/setjmp.S glibc-2.2.5/sysdeps/powerpc/setjmp.S
1080 --- glibc-2.2.5.old/sysdeps/powerpc/setjmp.S Thu Jul 5 21:56:01 2001
1081 +++ glibc-2.2.5/sysdeps/powerpc/setjmp.S Thu Jul 10 11:43:44 2003
1086 +/* The FPU stores have been removed from this file - see fpu/setjmp.S */
1088 ENTRY (BP_SYM (__sigsetjmp))
1089 CHECK_BOUNDS_BOTH_WIDE_LIT (r3, r8, r9, JB_SIZE)
1093 stw r2,(JB_GPR2*4)(3)
1094 stw r14,((JB_GPRS+0)*4)(3)
1095 - stfd fp14,((JB_FPRS+0*2)*4)(3)
1097 stw r15,((JB_GPRS+1)*4)(3)
1098 - stfd fp15,((JB_FPRS+1*2)*4)(3)
1100 stw r16,((JB_GPRS+2)*4)(3)
1101 - stfd fp16,((JB_FPRS+2*2)*4)(3)
1103 stw r17,((JB_GPRS+3)*4)(3)
1104 - stfd fp17,((JB_FPRS+3*2)*4)(3)
1105 stw r18,((JB_GPRS+4)*4)(3)
1106 - stfd fp18,((JB_FPRS+4*2)*4)(3)
1107 stw r19,((JB_GPRS+5)*4)(3)
1108 - stfd fp19,((JB_FPRS+5*2)*4)(3)
1109 stw r20,((JB_GPRS+6)*4)(3)
1110 - stfd fp20,((JB_FPRS+6*2)*4)(3)
1111 stw r21,((JB_GPRS+7)*4)(3)
1112 - stfd fp21,((JB_FPRS+7*2)*4)(3)
1113 stw r22,((JB_GPRS+8)*4)(3)
1114 - stfd fp22,((JB_FPRS+8*2)*4)(3)
1115 stw r23,((JB_GPRS+9)*4)(3)
1116 - stfd fp23,((JB_FPRS+9*2)*4)(3)
1117 stw r24,((JB_GPRS+10)*4)(3)
1118 - stfd fp24,((JB_FPRS+10*2)*4)(3)
1119 stw r25,((JB_GPRS+11)*4)(3)
1120 - stfd fp25,((JB_FPRS+11*2)*4)(3)
1121 stw r26,((JB_GPRS+12)*4)(3)
1122 - stfd fp26,((JB_FPRS+12*2)*4)(3)
1123 stw r27,((JB_GPRS+13)*4)(3)
1124 - stfd fp27,((JB_FPRS+13*2)*4)(3)
1125 stw r28,((JB_GPRS+14)*4)(3)
1126 - stfd fp28,((JB_FPRS+14*2)*4)(3)
1127 stw r29,((JB_GPRS+15)*4)(3)
1128 - stfd fp29,((JB_FPRS+15*2)*4)(3)
1129 stw r30,((JB_GPRS+16)*4)(3)
1130 - stfd fp30,((JB_FPRS+16*2)*4)(3)
1131 stw r31,((JB_GPRS+17)*4)(3)
1132 - stfd fp31,((JB_FPRS+17*2)*4)(3)
1133 b JUMPTARGET (BP_SYM (__sigjmp_save))
1134 END (BP_SYM (__sigsetjmp))