qemu/fpu
Peter Maydell e3d142d073 fpu: Correct edgecase in float64_muladd
In handling float64_muladd, if we end up doing a subtraction of the
product and c, and the 128 bit result of this subtraction happens to
have its most significant bit in bit 63, we weren't handling this
correctly when attempting to normalize to put the most significant
bit into bit 126.  We would end up doing a right shift by a negative
number (undefined behaviour in C) so at best we would return an
incorrect result to the guest.  MSB in bit 63 has to be handled as a
special case separately from MSB in 0..62 and MSB in 63..126.  (MSB
in 127 is not possible.)

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2013-04-15 16:06:15 +02:00
..
softfloat-macros.h softfloat: Replace int16 type with int_fast16_t 2012-04-28 09:13:26 +00:00
softfloat-specialize.h softfloat: implement fused multiply-add NaN propagation for MIPS 2012-10-31 22:20:45 +01:00
softfloat.c fpu: Correct edgecase in float64_muladd 2013-04-15 16:06:15 +02:00