]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
(feupdateenv): Use only sw[0] and call feraiseexcept.
authorUlrich Drepper <drepper@redhat.com>
Sat, 17 Apr 2004 22:51:43 +0000 (22:51 +0000)
committerUlrich Drepper <drepper@redhat.com>
Sat, 17 Apr 2004 22:51:43 +0000 (22:51 +0000)
sysdeps/hppa/fpu/feupdateenv.c

index 8980dfd69caf365dd55b64ea53e42222bc10bbd5..7d50282e0569d516fb526a833ad40d61f341b80d 100644 (file)
@@ -27,11 +27,10 @@ feupdateenv (const fenv_t *envp)
 
   /* 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;