aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/i386/fpu/fesetenv.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/i386/fpu/fesetenv.c')
-rw-r--r--sysdeps/i386/fpu/fesetenv.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sysdeps/i386/fpu/fesetenv.c b/sysdeps/i386/fpu/fesetenv.c
index 9566e092ca..910aa0991c 100644
--- a/sysdeps/i386/fpu/fesetenv.c
+++ b/sysdeps/i386/fpu/fesetenv.c
@@ -72,6 +72,8 @@ __fesetenv (const fenv_t *envp)
if (envp == FE_DFL_ENV)
{
+ /* Clear SSE exceptions. */
+ mxcsr &= ~FE_ALL_EXCEPT;
/* Set mask for SSE MXCSR. */
mxcsr |= (FE_ALL_EXCEPT << 7);
/* Set rounding to FE_TONEAREST. */
@@ -80,6 +82,8 @@ __fesetenv (const fenv_t *envp)
}
else if (envp == FE_NOMASK_ENV)
{
+ /* Clear SSE exceptions. */
+ mxcsr &= ~FE_ALL_EXCEPT;
/* Do not mask exceptions. */
mxcsr &= ~(FE_ALL_EXCEPT << 7);
/* Set rounding to FE_TONEAREST. */