[PATCH] soft-fp: Fix used without set warning in _FP_MUL and _FP_DIV

David Miller davem@davemloft.net
Fri Dec 7 19:38:00 GMT 2012


From: Richard Henderson <rth@twiddle.net>
Date: Fri,  7 Dec 2012 13:19:45 -0600

> 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           | 6 ++++++
>  soft-fp/op-common.h | 4 ++--
>  2 files changed, 8 insertions(+), 2 deletions(-)
> 
> Ok to commit?

This is fine, thanks Richard.



More information about the Libc-alpha mailing list