softfloat: Fix shift128Right for shift counts 64..127
shift128Right would give the wrong result for a shift countbetween 64 and 127. This was never noticed because all ofour uses of this function are guaranteed not to use shiftcounts in this range.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>...
fpu: Correct edgecase in float64_muladd
In handling float64_muladd, if we end up doing a subtraction of theproduct and c, and the 128 bit result of this subtraction happens tohave its most significant bit in bit 63, we weren't handling thiscorrectly when attempting to normalize to put the most significant...
softfloat: Handle float_muladd_negate_c when product is zero
Honour float_muladd_negate_c in the case where the product is zero andc is nonzero. Previously we would fail to negate c.
Seen in (and tested against) the gfortran testsuite on MIPS.
Signed-off-by: Richard Sandiford <rdsandiford@googlemail.com>...
softfloat: Implement uint64_to_float128
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>Signed-off-by: Richard Henderson <rth@twiddle.net>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
softfloat: Fix uint64_to_float64
The interface to normalizeRoundAndPackFloat64 requires that thehigh bit be clear. Perform one shift-right-and-jam if needed.
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>Signed-off-by: Richard Henderson <rth@twiddle.net>...
fpu: move public header file to include/fpu
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
misc: move include files to include/qemu/
softfloat: implement fused multiply-add NaN propagation for MIPS
Add a pickNaNMulAdd function for MIPS, implementing NaN propagationrules for MIPS fused multiply-add instructions.
Cc: Peter Maydell <peter.maydell@linaro.org>Reviewed-by: Richard Henderson <rth@twiddle.net>...
fpu/softfloat.c: Remove pointless shift of always-zero value
In float16_to_float32, when returning an infinity, just pass zeroas the mantissa argument to packFloat32(), rather than shiftinga value which we know must be zero.
fpu/softfloat.c: Return correctly signed values from uint64_to_float32
The uint64_to_float32() conversion function was incorrectly alwaysreturning numbers with the sign bit set (ie negative numbers). Correctthis so we return positive numbers instead.
View revisions
Also available in: Atom