Statistics
| Branch: | Revision:

root / fpu / softfloat-specialize.h @ feature-archipelago

History | View | Annotate | Download (38.3 kB)

# Date Author Comment
bbc1dede 10/31/2012 11:20 pm Aurelien Jarno

softfloat: implement fused multiply-add NaN propagation for MIPS

Add a pickNaNMulAdd function for MIPS, implementing NaN propagation
rules for MIPS fused multiply-add instructions.

Cc: Peter Maydell <>
Reviewed-by: Richard Henderson <>...

213ff4e6 09/22/2012 08:59 pm Max Filippov

softfloat: add NO_SIGNALING_NANS

Architectures that don't have signaling NaNs can define
NO_SIGNALING_NANS, it will make float*_is_quiet_nan return 1 for any NaN
and float*_is_signaling_nan always return 0.

Signed-off-by: Max Filippov <>...

b81fe822 09/22/2012 08:59 pm Max Filippov

target-xtensa: specialize softfloat NaN rules

NaN propagation rule: leftmost NaN in the expression gets propagated to
the result.

Signed-off-by: Max Filippov <>
Signed-off-by: Blue Swirl <>

3bf7e40a 03/17/2012 03:01 pm Avi Kivity

softfloat: fix for C99

C99 appears to consider compound literals as non-constants, and complains
when they are used in static initializers. Switch to ordinary initializer
syntax.

Signed-off-by: Avi Kivity <>
Acked-by: Andreas Färber <>...

369be8f6 10/19/2011 07:14 pm Peter Maydell

softfloat: Implement fused multiply-add

Implement fused multiply-add as a softfloat primitive. This implements
"a+b*c" as a single step without any intermediate rounding; it is
specified in IEEE 754-2008 and implemented in a number of CPUs.

Signed-off-by: Peter Maydell <>

789ec7ce 07/29/2011 04:25 pm Paolo Bonzini

softfloat: change default nan definitions to variables

Most definitions in softfloat.h are really target-independent, but the
file is not because it includes definitions of the default NaN values.
Change those to variables to allow including softfloat.h from files that...

be22a9ab 06/03/2011 05:07 pm Aurelien Jarno

softfloat: always enable floatx80 and float128 support

Now that softfloat-native is gone, there is no real point on not always
enabling floatx80 and float128 support.

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

e2f42204 04/25/2011 12:18 pm Aurelien Jarno

softfloat: fix floatx80 handling of NaN

The floatx80 format uses an explicit bit that should be taken into account
when converting to and from commonNaN format.

When converting to commonNaN, the explicit bit should be removed if it is
a 1, and a default NaN should be used if it is 0....

d2fbca94 04/12/2011 09:49 pm Guan Xuetao

unicore32: necessary modifications for other files to support unicore32

Signed-off-by: Guan Xuetao <>
Signed-off-by: Blue Swirl <>

bb98fe42 03/21/2011 10:46 pm Andreas Färber

softfloat: Drop [s]bits{8, 16, 32, 64} types in favor of [u]int{8, 16, 32, 64}_t

They are defined with the same semantics as the POSIX types,
so prefer those for consistency. Suggested by Peter Maydell.

Cc: Peter Maydell <>
Cc: Aurelien Jarno <>...

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