]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Fix x86_64 fma4 pow inappropriate contraction (bug 19003).
authorJoseph Myers <joseph@codesourcery.com>
Thu, 24 Sep 2015 16:48:32 +0000 (16:48 +0000)
committerAurelien Jarno <aurelien@aurel32.net>
Tue, 8 Mar 2016 16:31:40 +0000 (17:31 +0100)
The x86_64 fma4 version of pow fails to disable contraction of
operations other than those explicitly intended to use fma
instructions, so resulting in large ulps errors on processors with
fma4 instructions, as in bug 18104 (165ulp for the test added for that
bug; error originally reported by "blaaa" on #glibc).  This patch adds
$(config-cflags-nofma) for e_pow-fma4.c, corresponding to the use for
e_pow.c in sysdeps/ieee754/dbl-64/Makefile.

Tested for x86_64 on a processor with fma4.

[BZ #19003]
* sysdeps/x86_64/fpu/multiarch/Makefile (CFLAGS-e_pow-fma4.c): Add
$(config-cflags-nofma).

(cherry picked from commit 51df2605064a2bfd44fa0655ef9815812347de80)

ChangeLog
NEWS
sysdeps/x86_64/fpu/multiarch/Makefile

index 602a9676af4ad53a3cf92f3ea7e213fb6786ebb1..6e42a1e775ae6ba5745ac0f97b531159ae344b42 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2015-09-24  Joseph Myers  <joseph@codesourcery.com>
+
+       [BZ #19003]
+       * sysdeps/x86_64/fpu/multiarch/Makefile (CFLAGS-e_pow-fma4.c): Add
+       $(config-cflags-nofma).
+
 2016-03-07  Hongjiu Zhang  <noctuorare@gmail.com>
 
        * elf/sln.c (makesymlink): Change struct stat to stat64, and lstat
diff --git a/NEWS b/NEWS
index 3d52bec40fdce46c597c8cf59931bbc318a3e33b..46792587b22655de9699106addec6b5e7e14ff2e 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -24,8 +24,8 @@ Version 2.22.1
 * The following bugs are resolved with this release:
 
   17905, 18420, 18421, 18480, 18589, 18743, 18778, 18781, 18787, 18796,
-  18870, 18887, 18921, 18928, 18969, 18985, 19018, 19058, 19174, 19178,
-  19682.
+  18870, 18887, 18921, 18928, 18969, 18985, 19003, 19018, 19058, 19174,
+  19178, 19682.
 
 * The LD_POINTER_GUARD environment variable can no longer be used to
   disable the pointer guard feature.  It is always enabled.
index 86ea473b4ff9f1fef0bd5a85689ded79dc67a9f3..631534a5ce0d9eecf42a9d5c93d53b5b5c0cfe3d 100644 (file)
@@ -16,7 +16,7 @@ CFLAGS-e_asin-fma4.c = -mfma4
 CFLAGS-e_atan2-fma4.c = -mfma4
 CFLAGS-e_exp-fma4.c = -mfma4
 CFLAGS-e_log-fma4.c = -mfma4
-CFLAGS-e_pow-fma4.c = -mfma4
+CFLAGS-e_pow-fma4.c = -mfma4 $(config-cflags-nofma)
 CFLAGS-halfulp-fma4.c = -mfma4
 CFLAGS-mpa-fma4.c = -mfma4
 CFLAGS-mpatan-fma4.c = -mfma4