aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--sysdeps/i386/fpu/fenv_private.h6
2 files changed, 11 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 56ef286..8f641de 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
2018-02-28 Joseph Myers <joseph@codesourcery.com>
+ [BZ #22902]
+ * sysdeps/i386/fpu/fenv_private.h [!__x86_64__]
+ (libc_feholdexcept_setroundf128): New macro.
+ [!__x86_64__] (libc_feupdateenv_testf128): Likewise.
+
[BZ #15105]
* sysdeps/wordsize-32/strtoumax.c (strtoumax): Use
libc_hidden_def.
diff --git a/sysdeps/i386/fpu/fenv_private.h b/sysdeps/i386/fpu/fenv_private.h
index a258f48..357613a 100644
--- a/sysdeps/i386/fpu/fenv_private.h
+++ b/sysdeps/i386/fpu/fenv_private.h
@@ -339,6 +339,12 @@ libc_feresetround_387 (fenv_t *e)
SET_RESTORE_ROUND_GENERIC (RM, libc_feholdsetround_sse, libc_feresetround_sse)
# define libc_feholdexcept_setroundf128 libc_feholdexcept_setround_sse
# define libc_feupdateenv_testf128 libc_feupdateenv_test_sse
+#else
+/* The 387 rounding mode is used by soft-fp for 32-bit, but whether
+ 387 or SSE exceptions are used depends on whether libgcc was built
+ for SSE math, which is not known when glibc is being built. */
+# define libc_feholdexcept_setroundf128 default_libc_feholdexcept_setround
+# define libc_feupdateenv_testf128 default_libc_feupdateenv_test
#endif
/* We have support for rounding mode context. */