This is the mail archive of the
glibc-cvs@sourceware.org
mailing list for the glibc project.
GNU C Library master sources branch, master, updated. glibc-2.15-1128-g4842e4f
- From: jsm28 at sourceware dot org
- To: glibc-cvs at sourceware dot org
- Date: 1 Jun 2012 19:02:42 -0000
- Subject: GNU C Library master sources branch, master, updated. glibc-2.15-1128-g4842e4f
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".
The branch, master has been updated
via 4842e4fe5fcb90312f330b0a98cf73f082aefd01 (commit)
via efb734887e10cb5adb0e722012fd65df8d1f8ff5 (commit)
from 29bcce7ce456a9fe098793784b97c7e2cd446aca (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=4842e4fe5fcb90312f330b0a98cf73f082aefd01
commit 4842e4fe5fcb90312f330b0a98cf73f082aefd01
Author: Joseph Myers <joseph@codesourcery.com>
Date: Fri Jun 1 19:02:21 2012 +0000
Ensure additions are not scheduled after fetestexcept in fmaf and fmal.
diff --git a/ChangeLog b/ChangeLog
index f794e9f..deb1c0a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2012-06-01 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/ieee754/dbl-64/s_fmaf.c (__fmaf): Ensure temp + (double)
+ z computation is not scheduled after fetestexcept.
+ * sysdeps/ieee754/ldbl-128/s_fmal.c: Include <math_private.h>.
+ Use math_force_eval instead of asm to ensure calculation scheduled
+ before exception test.
+ * sysdeps/ieee754/ldbl-96/s_fmal.c: Include <math_private.h>.
+ Ensure a1 + u.d computation is not scheduled after fetestexcept.
+
2012-06-01 Aurelien Jarno <aurelien@aurel32.net>
* sysdeps/ieee754/dbl-64/s_fma.c (__fma): Ensure a1 + u.d
diff --git a/sysdeps/ieee754/dbl-64/s_fmaf.c b/sysdeps/ieee754/dbl-64/s_fmaf.c
index 7a939aa..e7a0650 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;
diff --git a/sysdeps/ieee754/ldbl-128/s_fmal.c b/sysdeps/ieee754/ldbl-128/s_fmal.c
index 3b85b17..963bbd7 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
diff --git a/sysdeps/ieee754/ldbl-96/s_fmal.c b/sysdeps/ieee754/ldbl-96/s_fmal.c
index 76866fb..ca1e090 100644
--- a/sysdeps/ieee754/ldbl-96/s_fmal.c
+++ b/sysdeps/ieee754/ldbl-96/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:
@@ -174,6 +175,8 @@ __fmal (long double x, long double y, long double z)
if ((u.ieee.mantissa1 & 1) == 0)
u.ieee.mantissa1 |= fetestexcept (FE_INEXACT) != 0;
v.d = a1 + u.d;
+ /* Ensure the addition is not scheduled after fetestexcept call. */
+ math_force_eval (v.d);
int j = fetestexcept (FE_INEXACT) != 0;
feupdateenv (&env);
/* Ensure the following computations are performed in default rounding
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=efb734887e10cb5adb0e722012fd65df8d1f8ff5
commit efb734887e10cb5adb0e722012fd65df8d1f8ff5
Author: Aurelien Jarno <aurelien@aurel32.net>
Date: Fri Jun 1 19:01:17 2012 +0000
Add a barrier in the double fma implementation.
diff --git a/ChangeLog b/ChangeLog
index 8cc25ef..f794e9f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2012-06-01 Aurelien Jarno <aurelien@aurel32.net>
+
+ * sysdeps/ieee754/dbl-64/s_fma.c (__fma): Ensure a1 + u.d
+ computation is not scheduled after fetestexcept.
+
2012-06-01 H.J. Lu <hongjiu.lu@intel.com>
[BZ #14117]
diff --git a/sysdeps/ieee754/dbl-64/s_fma.c b/sysdeps/ieee754/dbl-64/s_fma.c
index ab20a80..ce3bd36 100644
--- a/sysdeps/ieee754/dbl-64/s_fma.c
+++ b/sysdeps/ieee754/dbl-64/s_fma.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.
@@ -158,6 +158,8 @@ __fma (double x, double y, double z)
if ((u.ieee.mantissa1 & 1) == 0)
u.ieee.mantissa1 |= libc_fetestexcept (FE_INEXACT) != 0;
v.d = a1 + u.d;
+ /* Ensure the addition is not scheduled after fetestexcept call. */
+ math_force_eval (v.d);
}
/* Reset rounding mode and test for inexact simultaneously. */
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 15 +++++++++++++++
sysdeps/ieee754/dbl-64/s_fma.c | 4 +++-
sysdeps/ieee754/dbl-64/s_fmaf.c | 4 +++-
sysdeps/ieee754/ldbl-128/s_fmal.c | 5 +++--
sysdeps/ieee754/ldbl-96/s_fmal.c | 5 ++++-
5 files changed, 28 insertions(+), 5 deletions(-)
hooks/post-receive
--
GNU C Library master sources