about summary refs log tree commit diff
path: root/sysdeps/i386/Makefile
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2018-06-21 08:04:29 +0200
committerFlorian Weimer <fweimer@redhat.com>2018-06-21 08:04:29 +0200
commitf496b28e61d0342f579bf794c71b80e9c7d0b1b5 (patch)
treeee777dc879fab83f1b9c110ee97721d2b4aac4d3 /sysdeps/i386/Makefile
parent99c7adf99fd0ec4526e592816588d9e3de9a8a4e (diff)
downloadglibc-f496b28e61d0342f579bf794c71b80e9c7d0b1b5.tar.gz
glibc-f496b28e61d0342f579bf794c71b80e9c7d0b1b5.tar.xz
glibc-f496b28e61d0342f579bf794c71b80e9c7d0b1b5.zip
math: Set 387 and SSE2 rounding mode for tgamma on i386 [BZ #23253]
Previously, only the SSE2 rounding mode was set, so the assembler
implementations using 387 were not following the expecting rounding
mode.
Diffstat (limited to 'sysdeps/i386/Makefile')
-rw-r--r--sysdeps/i386/Makefile8
1 files changed, 8 insertions, 0 deletions
diff --git a/sysdeps/i386/Makefile b/sysdeps/i386/Makefile
index 1682394e76..c0a4fe15d4 100644
--- a/sysdeps/i386/Makefile
+++ b/sysdeps/i386/Makefile
@@ -5,6 +5,14 @@ asm-CPPFLAGS += -DGAS_SYNTAX
 # The i386 `long double' is a distinct type we support.
 long-double-fcts = yes
 
+ifeq ($(subdir),math)
+# These functions change the rounding mode internally and need to
+# update both the SSE2 rounding mode and the 387 rounding mode.  See
+# the handling of MATH_SET_BOTH_ROUNDING_MODES in
+# sysdeps/i386/fpu/fenv_private.h.
+CFLAGS-e_gamma_r.c += -DMATH_SET_BOTH_ROUNDING_MODES
+endif
+
 ifeq ($(subdir),string)
 sysdep_routines += cacheinfo
 endif