about summary refs log tree commit diff
path: root/sysdeps/ieee754/dbl-64/s_fmaf.c
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2012-06-01 19:02:21 +0000
committerJoseph Myers <joseph@codesourcery.com>2012-06-01 19:02:21 +0000
commit4842e4fe5fcb90312f330b0a98cf73f082aefd01 (patch)
tree343bf41267307f8e504155a9a006b468ff9379b7 /sysdeps/ieee754/dbl-64/s_fmaf.c
parentefb734887e10cb5adb0e722012fd65df8d1f8ff5 (diff)
downloadglibc-4842e4fe5fcb90312f330b0a98cf73f082aefd01.tar.gz
glibc-4842e4fe5fcb90312f330b0a98cf73f082aefd01.tar.xz
glibc-4842e4fe5fcb90312f330b0a98cf73f082aefd01.zip
Ensure additions are not scheduled after fetestexcept in fmaf and fmal.
Diffstat (limited to 'sysdeps/ieee754/dbl-64/s_fmaf.c')
-rw-r--r--sysdeps/ieee754/dbl-64/s_fmaf.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sysdeps/ieee754/dbl-64/s_fmaf.c b/sysdeps/ieee754/dbl-64/s_fmaf.c
index 7a939aaed1..e7a0650f0f 100644
--- a/sysdeps/ieee754/dbl-64/s_fmaf.c
+++ b/sysdeps/ieee754/dbl-64/s_fmaf.c
@@ -1,5 +1,5 @@
 /* Compute x * y + z as ternary operation.
-   Copyright (C) 2010, 2011 Free Software Foundation, Inc.
+   Copyright (C) 2010-2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Jakub Jelinek <jakub@redhat.com>, 2010.
 
@@ -40,6 +40,8 @@ __fmaf (float x, float y, float z)
 
   /* Perform addition with round to odd.  */
   u.d = temp + (double) z;
+  /* Ensure the addition is not scheduled after fetestexcept call.  */
+  math_force_eval (u.d);
 
   /* Reset rounding mode and test for inexact simultaneously.  */
   int j = libc_feupdateenv_test (&env, FE_INEXACT) != 0;