about summary refs log tree commit diff
path: root/sysdeps
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@gmail.com>2010-10-19 12:47:13 -0400
committerUlrich Drepper <drepper@gmail.com>2010-10-19 12:47:13 -0400
commit6ce0bb748d7de856cb2076b41625fe7cedac5e16 (patch)
treef55b2908bb8b2f28cc80e6753d47161b46aa58c7 /sysdeps
parent475facd1f553ad6d45de1137bd2a22e70307c7bf (diff)
parent7c08a05c5f4f86f9e249c2554b1628da0f812364 (diff)
downloadglibc-6ce0bb748d7de856cb2076b41625fe7cedac5e16.tar.gz
glibc-6ce0bb748d7de856cb2076b41625fe7cedac5e16.tar.xz
glibc-6ce0bb748d7de856cb2076b41625fe7cedac5e16.zip
Merge branch 'master' of ssh://sourceware.org/git/glibc
Conflicts:
	ChangeLog
Diffstat (limited to 'sysdeps')
-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;