diff options
-rw-r--r-- | ChangeLog | 9 | ||||
-rw-r--r-- | sysdeps/ieee754/dbl-64/s_fma.c | 5 | ||||
-rw-r--r-- | sysdeps/ieee754/ldbl-128/s_fmal.c | 5 | ||||
-rw-r--r-- | sysdeps/ieee754/ldbl-96/s_fma.c | 5 | ||||
-rw-r--r-- | sysdeps/ieee754/ldbl-96/s_fmal.c | 5 |
5 files changed, 25 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog index c874d89c2a..8e13d27907 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2016-01-15 H.J. Lu <hongjiu.lu@intel.com> + + [BZ #19465] + * sysdeps/ieee754/dbl-64/s_fma.c (__fma): Call math_opt_barrier + inside if. + * sysdeps/ieee754/ldbl-128/s_fmal.c (__fmal): Likewise. + * sysdeps/ieee754/ldbl-96/s_fma.c (__fma): Likewise. + * sysdeps/ieee754/ldbl-96/s_fmal.c (__fmal): Likewise. + 2016-01-14 H.J. Lu <hongjiu.lu@intel.com> [BZ #19466] diff --git a/sysdeps/ieee754/dbl-64/s_fma.c b/sysdeps/ieee754/dbl-64/s_fma.c index bc3677d0c5..a3492434e4 100644 --- a/sysdeps/ieee754/dbl-64/s_fma.c +++ b/sysdeps/ieee754/dbl-64/s_fma.c @@ -175,7 +175,10 @@ __fma (double x, double y, double z) /* Ensure correct sign of exact 0 + 0. */ if (__glibc_unlikely ((x == 0 || y == 0) && z == 0)) - return x * y + z; + { + x = math_opt_barrier (x); + return x * y + z; + } fenv_t env; libc_feholdexcept_setround (&env, FE_TONEAREST); diff --git a/sysdeps/ieee754/ldbl-128/s_fmal.c b/sysdeps/ieee754/ldbl-128/s_fmal.c index ac30027af9..728949c916 100644 --- a/sysdeps/ieee754/ldbl-128/s_fmal.c +++ b/sysdeps/ieee754/ldbl-128/s_fmal.c @@ -179,7 +179,10 @@ __fmal (long double x, long double y, long double z) /* Ensure correct sign of exact 0 + 0. */ if (__glibc_unlikely ((x == 0 || y == 0) && z == 0)) - return x * y + z; + { + x = math_opt_barrier (x); + return x * y + z; + } fenv_t env; feholdexcept (&env); diff --git a/sysdeps/ieee754/ldbl-96/s_fma.c b/sysdeps/ieee754/ldbl-96/s_fma.c index 5fbdda7ea9..ab45bcfce2 100644 --- a/sysdeps/ieee754/ldbl-96/s_fma.c +++ b/sysdeps/ieee754/ldbl-96/s_fma.c @@ -41,7 +41,10 @@ __fma (double x, double y, double z) /* Ensure correct sign of exact 0 + 0. */ if (__glibc_unlikely ((x == 0 || y == 0) && z == 0)) - return x * y + z; + { + x = math_opt_barrier (x); + return x * y + z; + } fenv_t env; feholdexcept (&env); diff --git a/sysdeps/ieee754/ldbl-96/s_fmal.c b/sysdeps/ieee754/ldbl-96/s_fmal.c index 57774cf686..f1467fda3d 100644 --- a/sysdeps/ieee754/ldbl-96/s_fmal.c +++ b/sysdeps/ieee754/ldbl-96/s_fmal.c @@ -177,7 +177,10 @@ __fmal (long double x, long double y, long double z) /* Ensure correct sign of exact 0 + 0. */ if (__glibc_unlikely ((x == 0 || y == 0) && z == 0)) - return x * y + z; + { + x = math_opt_barrier (x); + return x * y + z; + } fenv_t env; feholdexcept (&env); |