diff options
author | Joseph Myers <joseph@codesourcery.com> | 2012-06-01 19:02:21 +0000 |
---|---|---|
committer | Joseph Myers <joseph@codesourcery.com> | 2012-06-01 19:02:21 +0000 |
commit | 4842e4fe5fcb90312f330b0a98cf73f082aefd01 (patch) | |
tree | 343bf41267307f8e504155a9a006b468ff9379b7 /sysdeps/ieee754/ldbl-128 | |
parent | efb734887e10cb5adb0e722012fd65df8d1f8ff5 (diff) | |
download | glibc-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/ldbl-128')
-rw-r--r-- | sysdeps/ieee754/ldbl-128/s_fmal.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sysdeps/ieee754/ldbl-128/s_fmal.c b/sysdeps/ieee754/ldbl-128/s_fmal.c index 3b85b17faf..963bbd7345 100644 --- a/sysdeps/ieee754/ldbl-128/s_fmal.c +++ b/sysdeps/ieee754/ldbl-128/s_fmal.c @@ -1,5 +1,5 @@ /* Compute x * y + z as ternary operation. - Copyright (C) 2010 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. @@ -21,6 +21,7 @@ #include <math.h> #include <fenv.h> #include <ieee754.h> +#include <math_private.h> /* This implementation uses rounding to odd to avoid problems with double rounding. See a paper by Boldo and Melquiond: @@ -175,7 +176,7 @@ __fmal (long double x, long double y, long double z) 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)); + math_force_eval (v.d); int j = fetestexcept (FE_INEXACT) != 0; feupdateenv (&env); /* Ensure the following computations are performed in default rounding |