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.16-ports-merge-855-g573cd48
- From: rth at sourceware dot org
- To: glibc-cvs at sourceware dot org
- Date: 7 Dec 2012 19:41:44 -0000
- Subject: GNU C Library master sources branch master updated. glibc-2.16-ports-merge-855-g573cd48
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 573cd4843a9737103e6842470aea73e7687c2193 (commit)
from 7514f09e1e7e88c6d7f1fdabcd14469bccbf3167 (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=573cd4843a9737103e6842470aea73e7687c2193
commit 573cd4843a9737103e6842470aea73e7687c2193
Author: Richard Henderson <rth@twiddle.net>
Date: Fri Dec 7 13:17:08 2012 -0600
soft-fp: Fix used without set warning in _FP_MUL and _FP_DIV
Seen in, e.g. ports/sysdeps/alpha/soft-fp/ots_mul.c.
The problem here is we have a switch on the class of X*Y, followed by
a switch on the class of R. The exponent field of R really is not set
by the first switch for NaN outputs, because we know it's not going to
be used. The compiler is not smart enough to see through this.
By pulling the exponent computation out of the NORMAL*NORMAL path, we
will not be pessimizing the most common case, while still providing an
arbitrary value to satisfy the compiler.
diff --git a/ChangeLog b/ChangeLog
index 2dfde80..80707a2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2012-12-07 Richard Henderson <rth@redhat.com>
+
+ * soft-fp/op-common.h (_FP_MUL): Pull computation of R_e from the
+ normal/normal case to before the switch.
+ (_FP_DIV): Likewise.
+
2012-12-06 Carlos O'Donell <carlos@systemhalted.org>
Mike Frysinger <vapier@gentoo.org>
diff --git a/soft-fp/op-common.h b/soft-fp/op-common.h
index 8855ad3..6e81b13 100644
--- a/soft-fp/op-common.h
+++ b/soft-fp/op-common.h
@@ -748,11 +748,11 @@ do { \
#define _FP_MUL(fs, wc, R, X, Y) \
do { \
R##_s = X##_s ^ Y##_s; \
+ R##_e = X##_e + Y##_e + 1; \
switch (_FP_CLS_COMBINE(X##_c, Y##_c)) \
{ \
case _FP_CLS_COMBINE(FP_CLS_NORMAL,FP_CLS_NORMAL): \
R##_c = FP_CLS_NORMAL; \
- R##_e = X##_e + Y##_e + 1; \
\
_FP_MUL_MEAT_##fs(R,X,Y); \
\
@@ -811,11 +811,11 @@ do { \
#define _FP_DIV(fs, wc, R, X, Y) \
do { \
R##_s = X##_s ^ Y##_s; \
+ R##_e = X##_e - Y##_e; \
switch (_FP_CLS_COMBINE(X##_c, Y##_c)) \
{ \
case _FP_CLS_COMBINE(FP_CLS_NORMAL,FP_CLS_NORMAL): \
R##_c = FP_CLS_NORMAL; \
- R##_e = X##_e - Y##_e; \
\
_FP_DIV_MEAT_##fs(R,X,Y); \
break; \
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 6 ++++++
soft-fp/op-common.h | 4 ++--
2 files changed, 8 insertions(+), 2 deletions(-)
hooks/post-receive
--
GNU C Library master sources