softfloat: Support halving the result of muladd operation
The ARMv8 instruction set includes a fused floating pointreciprocal square root step instruction which demands an"(x * y + z) / 2" fused operation. Support this by addinga flag to the softfloat muladd operations which requests...
softfloat: Add float32_to_uint64()
This patch adds the float32_to_uint64() routine, which converts a32-bit floating point number to an unsigned 64 bit number.
This contribution can be licensed under either the softfloat-2a or -2blicense.
Signed-off-by: Tom Musta <tommusta@gmail.com>...
softfloat: Fix float64_to_uint64_round_to_zero
The float64_to_uint64_round_to_zero routine is incorrect.
For example, the following test pattern:
46697351FF4AEC29 / 0x1.97351ff4aec29p+103
currently produces 8000000000000000 instead of FFFFFFFFFFFFFFFF....
softfloat: Fix float64_to_uint32
The float64_to_uint32 has several flaws:
- for numbers between 2**32 and 2**64, the inexact exception flag may get incorrectly set. In this case, only the invalid flag should be set.
test pattern: 425F81378DC0CD1F / 0x1.f81378dc0cd1fp+38...
softfloat: Fix float64_to_uint32_round_to_zero
The float64_to_uint32_round_to_zero routine is incorrect.
425F81378DC0CD1F / 0x1.f81378dc0cd1fp+38
will erroneously set the inexact flag.
This patch re-implements the routine to use the float64_to_uint64_round_to_zero...
softfloat: Provide complete set of accessors for fp state
Tidy up the get/set accessors for the fp state to add missing onesand make them all inline in softfloat.h rather than some inline andsome not.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>...
softfloat: Factor out RoundAndPackFloat16 and NormalizeFloat16Subnormal
In preparation for adding conversions between float16 and float64,factor out code currently done inline in the float16<=>float32conversion functions into functions RoundAndPackFloat16 and...
softfloat: Add float16 <=> float64 conversion functions
Add the conversion functions float16_to_float64() andfloat64_to_float16(), which will be needed for the ARMA64 instruction set.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>Reviewed-by: Richard Henderson <rth@twiddle.net>
softfloat: Refactor code handling various rounding modes
Refactor the code in various functions which calculates roundingincrements given the current rounding mode, so that instead of aset of nested if statements we have a simple switch statement.This will give us a clean place to add the case for the new...
softfloat: Add support for ties-away rounding
IEEE754-2008 specifies a new rounding mode:
"roundTiesToAway: the floating-point number nearest to the infinitelyprecise result shall be delivered; if the two nearest floating-pointnumbers bracketing an unrepresentable infinitely precise result are...
View revisions
Also available in: Atom