]> git.ipfire.org Git - thirdparty/glibc.git/commit
soft-fp: Fix used without set warning in _FP_MUL and _FP_DIV
authorRichard Henderson <rth@twiddle.net>
Fri, 7 Dec 2012 19:17:08 +0000 (13:17 -0600)
committerRichard Henderson <rth@twiddle.net>
Fri, 7 Dec 2012 19:17:08 +0000 (13:17 -0600)
commit573cd4843a9737103e6842470aea73e7687c2193
treee23792a304b4a253761f55d490aa7e03ec81397f
parent7514f09e1e7e88c6d7f1fdabcd14469bccbf3167
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.
ChangeLog
soft-fp/op-common.h