This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
[PATCH] feupdateenv fixes for hppa
- From: Carlos O'Donell <carlos at baldric dot uwo dot ca>
- To: libc-alpha <libc-alpha at sources dot redhat dot com>
- Date: Mon, 5 Apr 2004 00:12:02 -0400
- Subject: [PATCH] feupdateenv fixes for hppa
libc-alpha,
feudatepenv uses the 'const' input variable as temporary storage, and it
should not. The newest gcc in debian alerted me to this bug. Patch passes
test-suite.
Cheers,
Carlos.
sysdeps/hppa/fpu/feupdateenv.c | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
2004-04-05 Carlos O'Donell <carlos@baldric.uwo.ca>
* sysdeps/hppa/fpu/feupdateenv.c (feupdateenv): Use only sw[0]
and call feraiseexcept.
--- libc-orig/sysdeps/hppa/fpu/feupdateenv.c 2003-12-18 00:13:38.000000000 -0500
+++ libc/sysdeps/hppa/fpu/feupdateenv.c 2004-04-01 06:01:00.000000000 -0500
@@ -27,11 +27,10 @@
/* Get the current exception status. */
__asm__ ("fstd %%fr0,0(%1)" : "=m" (*sw) : "r" (sw));
- sw[0] &= FE_ALL_EXCEPT;
- envp->__status_word = envp->__status_word | sw[0];
-
/* Install new environment. */
fesetenv (envp);
+ /* Raise the saved exceptions */
+ feraiseexcept(sw[0] & FE_ALL_EXCEPT);
/* Success. */
return 0;