Statistics
| Branch: | Revision:

root / fpu / softfloat-specialize.h @ 87b8cc3c

History | View | Annotate | Download (27 kB)

# Date Author Comment
8d725fac 03/21/2011 10:46 pm Andreas Färber

softfloat: Prepend QEMU-style header with derivation notice

The SoftFloat license requires "prominent notice that the work
is derivative". Having added features like improved 16-bit support
for arm already, add such a notice to the sources.

softfloat-native.[ch] are not under the SoftFloat license...

8559666d 02/24/2011 09:53 am Christophe Lyon

softfloat: move all default NaN definitions to softfloat.h.

These special values are needed to implement some helper functions,
which return/use these values in some cases.

Signed-off-by: Christophe Lyon <>
Reviewed-by: Peter Maydell <>...

f591e1be 02/10/2011 07:28 pm Peter Maydell

softfloat: Correctly handle NaNs in float16_to_float32()

Correctly handle NaNs in float16_to_float32(), by defining and
using a float16ToCommonNaN() function, as we do with the other formats.

Signed-off-by: Peter Maydell <>
Signed-off-by: Aurelien Jarno <>

600e30d2 02/10/2011 07:28 pm Peter Maydell

softfloat: Fix single-to-half precision float conversions

Fix various bugs in the single-to-half-precision conversion code: * input NaNs not correctly converted in IEEE mode
(fixed by defining and using a commonNaNToFloat16()) * wrong values returned when converting NaN/Inf into non-IEEE...

bcd4d9af 02/10/2011 07:28 pm Christophe Lyon

softfloat: Honour default_nan_mode for float-to-float conversions

Honour the default_nan_mode flag when doing conversions between
different floating point formats, as well as when returning a NaN from
a two-operand floating point function. This corrects the behaviour...

bb4d4bb3 02/10/2011 07:28 pm Peter Maydell

softfloat: Add float16 type and float16 NaN handling functions

Add a float16 type to softfloat, rather than using bits16 directly.
Also add the missing functions float16_is_quiet_nan(),
float16_is_signaling_nan() and float16_maybe_silence_nan(),
which are needed for the float16 conversion routines....

de4af5f7 01/20/2011 01:37 pm Aurelien Jarno

softfloat: fix floatx80_is_{quiet,signaling}_nan()

floatx80_is_{quiet,signaling}_nan() functions are incorrectly detecting
the type of NaN, depending on SNAN_BIT_IS_ONE, one of the two is
returning the correct value, and the other true for any kind of NaN....

e9087750 01/14/2011 09:39 pm Aurelien Jarno

softfloat: SH4 has the sNaN bit set

Signed-off-by: Aurelien Jarno <>

10201602 01/14/2011 09:39 pm Aurelien Jarno

softfloat: fix default-NaN mode

When the default-NaN mode is enabled, it should return the default NaN
value, but it should anyway raise the invalid operation flag if one of
the operand is an sNaN.

I have checked that this behavior matches the ARM and SH4 manuals, as...

e024e881 01/06/2011 05:29 pm Aurelien Jarno

target-ppc: Implement correct NaN propagation rules

Implement the correct NaN propagation rules for PowerPC targets by
providing an appropriate pickNaN function.

Also fix the #ifdef tests for default NaN definition, the correct name
is TARGET_PPC instead of TARGET_POWERPC....

084d19ba 01/06/2011 05:29 pm Aurelien Jarno

target-mips: Implement correct NaN propagation rules

Implement the correct NaN propagation rules for MIPS targets by
providing an appropriate pickNaN function.

Signed-off-by: Aurelien Jarno <>

1f398e08 01/06/2011 05:29 pm Aurelien Jarno

softfloat: use float{32,64,x80,128}_maybe_silence_nan()

Use float{32,64,x80,128}_maybe_silence_nan() instead of toggling the
sNaN bit manually. This allow per target implementation of sNaN to qNaN
conversion.

Signed-off-by: Aurelien Jarno <>...

f6a7d92a 01/06/2011 05:29 pm Aurelien Jarno

softfloat: add float{x80,128}_maybe_silence_nan()

Add float{x80,128}_maybe_silence_nan() functions, they will be need by
propagateFloat{x80,128}NaN().

Reviewed-by: Peter Maydell <>
Signed-off-by: Aurelien Jarno <>

93ae1c6f 01/06/2011 05:29 pm Aurelien Jarno

softfloat: fix float{32,64}_maybe_silence_nan() for MIPS

On targets that define sNaN with the sNaN bit as one, simply clearing
this bit may correspond to an infinite value.

Convert it to a default NaN if SNAN_BIT_IS_ONE, as it corresponds to
the MIPS implementation, the only emulated CPU with SNAN_BIT_IS_ONE....

d735d695 01/06/2011 05:29 pm Aurelien Jarno

softfloat: rename *IsNaN variables to *IsQuietNaN

Similarly to what has been done in commit
185698715dfb18c82ad2a5dbc169908602d43e81 rename the misnamed *IsNaN
variables into *IsQuietNaN.

Reviewed-by: Peter Maydell <>
Signed-off-by: Aurelien Jarno <>

34d23861 01/06/2011 05:29 pm Aurelien Jarno

softfloat: remove HPPA specific code

We don't have any HPPA target, so let's remove HPPA specific code. It
can be re-added when someone adds an HPPA target.

This has been blessed by Stuart Brady <>, author of the
target-hppa fork.

Reviewed-by: Peter Maydell <>...

011da610 01/03/2011 12:59 am Peter Maydell

target-arm: Implement correct NaN propagation rules

Implement the correct NaN propagation rules for ARM targets by
providing an appropriate pickNaN function.

Signed-off-by: Peter Maydell <>
Signed-off-by: Aurelien Jarno <>

354f211b 01/03/2011 12:58 am Peter Maydell

softfloat: abstract out target-specific NaN propagation rules

IEEE754 doesn't specify precisely what NaN should be returned as
the result of an operation on two input NaNs. This is therefore
target-specific. Abstract out the code in propagateFloat*NaN()
which was implementing the x87 propagation rules, so that it...

18569871 01/02/2011 12:15 pm Peter Maydell

softfloat: Rename float*_is_nan() functions to float*_is_quiet_nan()

The softfloat functions float*_is_nan() were badly misnamed,
because they return true only for quiet NaNs, not for all NaNs.
Rename them to float*_is_quiet_nan() to more accurately reflect...

b408dbde 12/07/2010 05:37 pm Peter Maydell

softfloat: Add float*_maybe_silence_nan() functions

Add functions float*_maybe_silence_nan() which ensure that a
value is not a signaling NaN by turning it into a quiet NaN.

Signed-off-by: Peter Maydell <>
Reviewed-by: Nathan Froyd <>

990b3e19 12/13/2009 09:32 pm Richard Henderson

target-alpha: Enable softfloat.

Signed-off-by: Richard Henderson <>
Signed-off-by: Aurelien Jarno <>

70c14705 03/07/2009 06:03 pm blueswir1

Sparse fixes: dubious mixing of bitwise and logical operations

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6741 c046a42c-6fe2-441c-8c8c-71466251a162

5c7908ed 12/19/2008 03:53 pm pbrook

Implement default-NaN mode.

Signed-off-by: Paul Brook <>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6106 c046a42c-6fe2-441c-8c8c-71466251a162

9027db89 11/04/2008 02:33 pm pbrook

Fix ARM default NaN.

Signed-off-by: Paul Brook <>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5618 c046a42c-6fe2-441c-8c8c-71466251a162

b1d8e52e 10/26/2008 03:43 pm blueswir1

Fix undeclared symbol warnings from sparse

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5539 c046a42c-6fe2-441c-8c8c-71466251a162

85016c98 12/26/2007 01:59 am ths

Assortment of soft-float fixes, by Aurelien Jarno.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3860 c046a42c-6fe2-441c-8c8c-71466251a162

f090c9d4 11/18/2007 04:33 pm pbrook

Add strict checking mode for softfp code.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3688 c046a42c-6fe2-441c-8c8c-71466251a162

5a6932d5 11/16/2007 04:57 pm ths

Fix NaN handling for MIPS and HPPA.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3655 c046a42c-6fe2-441c-8c8c-71466251a162

b645bb48 05/11/2007 08:10 pm ths

Fix softfloat NaN handling.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2805 c046a42c-6fe2-441c-8c8c-71466251a162

750afe93 10/28/2006 10:27 pm bellard

avoid using char when it is not necessary

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2204 c046a42c-6fe2-441c-8c8c-71466251a162

158142c2 03/13/2005 06:54 pm bellard

soft float support

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1332 c046a42c-6fe2-441c-8c8c-71466251a162