summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Henderson <rth@twiddle.net>2012-05-30 20:55:56 -0700
committerRichard Henderson <rth@twiddle.net>2012-05-31 07:43:43 -0700
commit8cac0ece48d57be4397e2ef3f124690391b7a6d5 (patch)
treeaab0f3dd4d212720f29c18caa2b1ce281a1bc714
parent13488b2eaec9f589e488765687e131ec7c321c8f (diff)
downloadglibc-8cac0ece48d57be4397e2ef3f124690391b7a6d5.tar.gz
alpha: Add -mieee-with-inexact for fma compilation
-rw-r--r--ChangeLog.alpha4
-rw-r--r--sysdeps/alpha/Makefile6
-rw-r--r--sysdeps/alpha/fpu/libm-test-ulps14
3 files changed, 10 insertions, 14 deletions
diff --git a/ChangeLog.alpha b/ChangeLog.alpha
index 72e102ac8a..48f3b97056 100644
--- a/ChangeLog.alpha
+++ b/ChangeLog.alpha
@@ -1,5 +1,9 @@
2012-05-30 Richard Henderson <rth@twiddle.net>
+ * sysdeps/alpha/Makefile (CFLAGS-s_fma.c): Set -mieee-with-inexact.
+ (CFLAGS-s_fmaf.c): Likewise.
+ * sysdeps/alpha/fpu/libm-test-ulps: Regenerate.
+
* sysdeps/unix/sysv/linux/alpha/brk.S: Fix error path for PIC.
* sysdeps/alpha/fpu/libm-test-ulps: Regenerate.
diff --git a/sysdeps/alpha/Makefile b/sysdeps/alpha/Makefile
index b08f69d997..17fd3b84d7 100644
--- a/sysdeps/alpha/Makefile
+++ b/sysdeps/alpha/Makefile
@@ -37,6 +37,12 @@ ifeq ($(subdir),elf)
CFLAGS-rtld.c = -mbuild-constants
endif
+ifeq ($(subdir),math)
+# The fma routines rely on inexact being raised for correct results.
+CFLAGS-s_fma.c = -mieee-with-inexact
+CFLAGS-s_fmaf.c = -mieee-with-inexact
+endif
+
# Build everything with full IEEE math support, and with dynamic rounding;
# there are a number of math routines that are defined to work with the
# "current" rounding mode, and it's easiest to set this with all of them.
diff --git a/sysdeps/alpha/fpu/libm-test-ulps b/sysdeps/alpha/fpu/libm-test-ulps
index 39884260a8..908154c4e8 100644
--- a/sysdeps/alpha/fpu/libm-test-ulps
+++ b/sysdeps/alpha/fpu/libm-test-ulps
@@ -1615,20 +1615,6 @@ Test "expm1 (500.0) == 1.4035922178528374107397703328409120821806e+217":
double: 1
idouble: 1
-# fma
-Test "fma (-0x1.19cab66d73e17p-959, 0x1.c7108a8c5ff51p-107, -0x0.80b0ad65d9b64p-1022) == -0x0.80b0ad65d9d59p-1022":
-double: 1
-idouble: 1
-Test "fma (0x1.0000002p+0, 0x1.ffffffcp-1, -0x1p-300) == 0x1.fffffffffffffp-1":
-double: 1
-idouble: 1
-Test "fma (0x1.153d650bb9f06p-907, 0x1.2d01230d48407p-125, -0x0.b278d5acfc3cp-1022) == -0x0.b22757123bbe9p-1022":
-double: 1
-idouble: 1
-Test "fma (0x1.4000004p-967, 0x1p-106, 0x0.000001p-1022) == 0x0.0000010000003p-1022":
-double: 1
-idouble: 1
-
# gamma
Test "gamma (-0.5) == log(2*sqrt(pi))":
ildouble: 1