GNU C Library master sources branch master updated. glibc-2.19-142-g76c96cf
jsm28@sourceware.org
jsm28@sourceware.org
Tue Mar 11 22:31:00 GMT 2014
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 76c96cf7ec0dc38089c9a887f80b3222f6084c82 (commit)
from 600fa36158cd741d897b2d22c735c60247b982e0 (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://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=76c96cf7ec0dc38089c9a887f80b3222f6084c82
commit 76c96cf7ec0dc38089c9a887f80b3222f6084c82
Author: Joseph Myers <joseph@codesourcery.com>
Date: Tue Mar 11 22:30:40 2014 +0000
Fix MIPS libc_feresetround*_ctx to preserve exceptions.
Testing on mips64 showed missing underflow exceptions (from exp, for
example) in non-default rounding modes, caused by
libc_feresetround*_ctx wrongly restoring a saved environment without
preserving exceptions, when that's only valid for the _noex variants.
(I don't know why Steve didn't see this in his testing.) This patch
fixes this by using libc_feupdateenv_mips_ctx for the relevant macros
and removing the problem definitions.
The problem definitions aren't suitable for the _noex macros either
because they only discard exceptions in non-default rounding modes,
and while for some uses of *_noex/*_NOEX it doesn't matter whether
exceptions are discarded, dbl-64/e_remainder.c requires
SET_RESTORE_ROUND_NOEX to cause exceptions to be discarded. I think
the accumulated set of macros / functions for optimized exception /
rounding mode handling could do with a careful review by now, and
possible refactoring, and at least one new feature (extracting the
saved rounding mode from an environment / context variable - see
dbl-64/e_sqrt.c for a case where this could be used).
Tested mips64.
* sysdeps/mips/math_private.h [__mips_hard_float]
(libc_feresetround_ctx): Define to libc_feupdateenv_mips_ctx not
libc_feresetround_mips_ctx.
[__mips_hard_float] (libc_feresetroundf_ctx): Likewise.
[__mips_hard_float] (libc_feresetroundl_ctx): Likewise.
[__mips_hard_float] (libc_feresetround_mips_ctx): Remove.
diff --git a/ChangeLog b/ChangeLog
index ca74dc3..cae7f85 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
2014-03-11 Joseph Myers <joseph@codesourcery.com>
+ * sysdeps/mips/math_private.h [__mips_hard_float]
+ (libc_feresetround_ctx): Define to libc_feupdateenv_mips_ctx not
+ libc_feresetround_mips_ctx.
+ [__mips_hard_float] (libc_feresetroundf_ctx): Likewise.
+ [__mips_hard_float] (libc_feresetroundl_ctx): Likewise.
+ [__mips_hard_float] (libc_feresetround_mips_ctx): Remove.
+
[BZ #16677]
* math/s_nextafter.c (__nextafter): Do not return value from
overflowing computation.
diff --git a/sysdeps/mips/math_private.h b/sysdeps/mips/math_private.h
index edf6047..7f2cdf5 100644
--- a/sysdeps/mips/math_private.h
+++ b/sysdeps/mips/math_private.h
@@ -217,6 +217,9 @@ libc_feupdateenv_mips_ctx (struct rm_ctx *ctx)
# define libc_feupdateenv_ctx libc_feupdateenv_mips_ctx
# define libc_feupdateenvf_ctx libc_feupdateenv_mips_ctx
# define libc_feupdateenvl_ctx libc_feupdateenv_mips_ctx
+# define libc_feresetround_ctx libc_feupdateenv_mips_ctx
+# define libc_feresetroundf_ctx libc_feupdateenv_mips_ctx
+# define libc_feresetroundl_ctx libc_feupdateenv_mips_ctx
static __always_inline void
libc_feholdsetround_mips_ctx (struct rm_ctx *ctx, int round)
@@ -242,16 +245,6 @@ libc_feholdsetround_mips_ctx (struct rm_ctx *ctx, int round)
# define libc_feholdsetroundf_ctx libc_feholdsetround_mips_ctx
# define libc_feholdsetroundl_ctx libc_feholdsetround_mips_ctx
-static __always_inline void
-libc_feresetround_mips_ctx (struct rm_ctx *ctx)
-{
- if (__glibc_unlikely (ctx->updated_status))
- _FPU_SETCW (ctx->env);
-}
-# define libc_feresetround_ctx libc_feresetround_mips_ctx
-# define libc_feresetroundf_ctx libc_feresetround_mips_ctx
-# define libc_feresetroundl_ctx libc_feresetround_mips_ctx
-
#endif
#include_next <math_private.h>
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 7 +++++++
sysdeps/mips/math_private.h | 13 +++----------
2 files changed, 10 insertions(+), 10 deletions(-)
hooks/post-receive
--
GNU C Library master sources
More information about the Glibc-cvs
mailing list