aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/x86_64/fpu
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/x86_64/fpu')
-rw-r--r--sysdeps/x86_64/fpu/fesetenv.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sysdeps/x86_64/fpu/fesetenv.c b/sysdeps/x86_64/fpu/fesetenv.c
index 3e3fd8492d..9950aa734a 100644
--- a/sysdeps/x86_64/fpu/fesetenv.c
+++ b/sysdeps/x86_64/fpu/fesetenv.c
@@ -42,6 +42,8 @@ __fesetenv (const fenv_t *envp)
temp.__opcode = 0;
temp.__data_offset = 0;
temp.__data_selector = 0;
+ /* Clear SSE exceptions. */
+ temp.__mxcsr &= ~FE_ALL_EXCEPT;
/* Set mask for SSE MXCSR. */
temp.__mxcsr |= (FE_ALL_EXCEPT << 7);
/* Set rounding to FE_TONEAREST. */
@@ -57,6 +59,8 @@ __fesetenv (const fenv_t *envp)
temp.__opcode = 0;
temp.__data_offset = 0;
temp.__data_selector = 0;
+ /* Clear SSE exceptions. */
+ temp.__mxcsr &= ~FE_ALL_EXCEPT;
/* Set mask for SSE MXCSR. */
/* Set rounding to FE_TONEAREST. */
temp.__mxcsr &= ~ 0x6000;