summaryrefslogtreecommitdiff
path: root/sysdeps/i386/fpu/math_private.h
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/i386/fpu/math_private.h')
-rw-r--r--sysdeps/i386/fpu/math_private.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/sysdeps/i386/fpu/math_private.h b/sysdeps/i386/fpu/math_private.h
index 5253998a57..65202269b0 100644
--- a/sysdeps/i386/fpu/math_private.h
+++ b/sysdeps/i386/fpu/math_private.h
@@ -16,4 +16,33 @@ do \
while (0)
#include_next <math_private.h>
+
+#include <fpu_control.h>
+
+#undef libc_feholdexcept_setround_53bit
+#define libc_feholdexcept_setround_53bit(e, r) \
+ do \
+ { \
+ fpu_control_t cw; \
+ libc_feholdexcept_setround (e, r); \
+ _FPU_GETCW (cw); \
+ cw &= ~(fpu_control_t) _FPU_EXTENDED; \
+ cw |= _FPU_DOUBLE; \
+ _FPU_SETCW (cw); \
+ } \
+ while (0)
+
+#undef libc_feupdateenv_53bit
+#define libc_feupdateenv_53bit(e) \
+ do \
+ { \
+ fpu_control_t cw; \
+ libc_feupdateenv (e); \
+ _FPU_GETCW (cw); \
+ cw &= ~(fpu_control_t) _FPU_EXTENDED; \
+ cw |= _FPU_EXTENDED; \
+ _FPU_SETCW (cw); \
+ } \
+ while (0)
+
#endif