aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/ieee754
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2010-10-18 07:29:50 -0400
committerUlrich Drepper <drepper@redhat.com>2010-10-18 07:29:50 -0400
commit7c08a05c5f4f86f9e249c2554b1628da0f812364 (patch)
treeba03c8bb069dfcd50dcf07eef670dd1da8bf27d6 /sysdeps/ieee754
parent3e692e0518b4f4679352d25102bd47cf3f85c592 (diff)
downloadglibc-7c08a05c5f4f86f9e249c2554b1628da0f812364.tar
glibc-7c08a05c5f4f86f9e249c2554b1628da0f812364.tar.gz
glibc-7c08a05c5f4f86f9e249c2554b1628da0f812364.tar.bz2
glibc-7c08a05c5f4f86f9e249c2554b1628da0f812364.zip
IEEE quad fmal fixes
Diffstat (limited to 'sysdeps/ieee754')
-rw-r--r--sysdeps/ieee754/ldbl-128/s_fmal.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sysdeps/ieee754/ldbl-128/s_fmal.c b/sysdeps/ieee754/ldbl-128/s_fmal.c
index 9ec5ba9ee9..b750538b8a 100644
--- a/sysdeps/ieee754/ldbl-128/s_fmal.c
+++ b/sysdeps/ieee754/ldbl-128/s_fmal.c
@@ -175,6 +175,8 @@ __fmal (long double x, long double y, long double z)
if ((u.ieee.mantissa3 & 1) == 0)
u.ieee.mantissa3 |= fetestexcept (FE_INEXACT) != 0;
v.d = a1 + u.d;
+ /* Ensure the addition is not scheduled after fetestexcept call. */
+ asm volatile ("" : "m" (v));
int j = fetestexcept (FE_INEXACT) != 0;
feupdateenv (&env);
/* Ensure the following computations are performed in default rounding
@@ -207,9 +209,9 @@ __fmal (long double x, long double y, long double z)
{
v.d *= 0x1p-226L;
if (v.ieee.negative)
- return v.d - 0x1p-16493L /* __LDBL_DENORM_MIN__ */;
+ return v.d - 0x1p-16494L /* __LDBL_DENORM_MIN__ */;
else
- return v.d + 0x1p-16493L /* __LDBL_DENORM_MIN__ */;
+ return v.d + 0x1p-16494L /* __LDBL_DENORM_MIN__ */;
}
else
return v.d * 0x1p-226L;