diff options
Diffstat (limited to 'libc/sysdeps/powerpc/nofpu/feupdateenv.c')
-rw-r--r-- | libc/sysdeps/powerpc/nofpu/feupdateenv.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/libc/sysdeps/powerpc/nofpu/feupdateenv.c b/libc/sysdeps/powerpc/nofpu/feupdateenv.c index 163f67310..000c4d182 100644 --- a/libc/sysdeps/powerpc/nofpu/feupdateenv.c +++ b/libc/sysdeps/powerpc/nofpu/feupdateenv.c @@ -1,6 +1,6 @@ /* Install given floating-point environment and raise exceptions (soft-float edition). - Copyright (C) 2002-2013 Free Software Foundation, Inc. + Copyright (C) 2002-2014 Free Software Foundation, Inc. Contributed by Aldy Hernandez <aldyh@redhat.com>, 2002. This file is part of the GNU C Library. @@ -28,14 +28,15 @@ __feupdateenv (const fenv_t *envp) int saved_exceptions; /* Save currently set exceptions. */ - saved_exceptions = __sim_exceptions; + saved_exceptions = __sim_exceptions_thread; /* Set environment. */ fesetenv (envp); /* Raise old exceptions. */ - __sim_exceptions |= saved_exceptions; - if (saved_exceptions & ~__sim_disabled_exceptions) + __sim_exceptions_thread |= saved_exceptions; + SIM_SET_GLOBAL (__sim_exceptions_global, __sim_exceptions_thread); + if (saved_exceptions & ~__sim_disabled_exceptions_thread) raise (SIGFPE); return 0; |