Statistics
| Branch: | Revision:

root / fpu / softfloat.h @ a74cdab4

History | View | Annotate | Download (25.7 kB)

# Date Author Comment
b76235e4 04/25/2011 12:18 pm Aurelien Jarno

softfloat: fix floatx80_is_infinity()

With floatx80, the explicit bit is set for infinity.

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

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

softfloat: add floatx80 constants

Add floatx80 constants similarly to float32 or float64.

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

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

softfloat: add pi constants

Add a pi constant for float32, float64, floatx80. It will be used by
target-i386 and later by the trigonometric functions.

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

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

softfloat: add floatx80_compare*() functions

Add floatx80_compare() and floatx80_compare_quiet() functions to match
the softfloat-native ones.

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

b689362d 04/17/2011 09:32 pm Aurelien Jarno

softfloat: move float*_eq and float*_eq_quiet

I am not a big fan of code moving, but having the signaling version in
the middle of quiet versions and vice versa doesn't make the code easy
to read.

This patch is a simple code move, basically swapping locations of...

67b7861d 04/17/2011 09:32 pm Aurelien Jarno

softfloat: add float*_unordered_{,quiet}() functions

Add float*_unordered() functions to softfloat, matching the softfloat-native
ones. Also add float*_unordered_quiet() functions to match the others
comparison functions.

This allow target-i386/ops_sse.h to be compiled with softfloat....

211315fb 04/17/2011 09:32 pm Aurelien Jarno

softfloat: rename float*_eq() into float*_eq_quiet()

float*_eq functions have a different semantics than other comparison
functions. Fix that by first renaming float*_quiet() into float*_eq_quiet().

Note that it is purely mechanical, and the behaviour should be unchanged....

2657d0ff 04/17/2011 09:32 pm Aurelien Jarno

softfloat: rename float*_eq_signaling() into float*_eq()

float*_eq_signaling functions have a different semantics than other
comparison functions. Fix that by renaming float*_quiet_signaling() into
float*_eq().

Note that it is purely mechanical, and the behaviour should be unchanged....

c29aca44 04/13/2011 12:33 am Peter Maydell

softfloat: Add setter function for tininess detection mode

Add a setter function for the underflow tininess detection mode,
in line with the similar functions for other parts of the float status
structure.

Signed-off-by: Peter Maydell <>...

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 <>

274f1b04 04/03/2011 06:19 pm Peter Maydell

softfloat: Add float*_min() and float*_max() functions

Add min and max operations to softfloat. This allows us to implement
propagation of NaNs and handling of negative zero correctly (unlike
the approach of having target helper routines return one of the operands...

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 <>...

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

softfloat: Resolve type mismatches between declaration and implementation

The original SoftFloat 2.0b library avoided the use of custom integer types
in its public headers. This requires the definitions of int{8,16,32,64} to
match the assumptions in the declarations. This breaks on BeOS R5 and Haiku/x86,...

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 <>...

c30fe7df 02/24/2011 09:53 am Christophe Lyon

softfloat: add _set_sign(), _infinity and _half for 32 and 64 bits floats.

These constants and utility function are needed to implement some
helpers. Defining constants avoids the need to re-compute them at
runtime.

Signed-off-by: Christophe Lyon <>...

d5138cf4 02/10/2011 09:16 pm Peter Maydell

softfloat: Fix compilation failures with USE_SOFTFLOAT_STRUCT_TYPES

Make softfloat compile with USE_SOFTFLOAT_STRUCT_TYPES defined, by
adding and using new macros const_float16(), const_float32() and
const_float64() so you can use array initializers in an array of...

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....

6f3300ad 01/14/2011 09:39 pm Peter Maydell

softfloat: Add float32_is_zero_or_denormal() function

Add a utility function to softfloat to test whether a float32
is zero or denormal.

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

2bed652f 01/07/2011 05:35 pm Peter Maydell

softfloat: Implement floatx80_is_any_nan() and float128_is_any_nan()

Implement versions of float*_is_any_nan() for the floatx80 and
float128 types.

Acked-by: Aurelien Jarno <>
Signed-off-by: Peter Maydell <>
Signed-off-by: Riku Voipio <>

37d18660 01/06/2011 11:16 pm Peter Maydell

softfloat: Implement flushing input denormals to zero

Add support to softfloat for flushing input denormal float32 and float64
to zero. softfloat's existing 'flush_to_zero' flag only flushes denormals
to zero on output. Some CPUs need input denormals to be flushed before...

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 <>

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...

21d6ebde 12/07/2010 05:37 pm Peter Maydell

softfloat: Add float*_is_any_nan() functions

Add float*_is_any_nan() functions which return true if the argument
is a NaN of any kind (quiet or signalling).

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

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 <>

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

softfloat: Add float/double to 16 bit integer conversion functions

The ARM architecture needs float/double to 16 bit integer conversions.
(The 32 bit versions aren't sufficient because of the requirement
to saturate at 16 bit MAXINT/MININT and to get the exception bits right.)...

8229c991 07/13/2010 07:18 pm Aurelien Jarno

softfloat: add float32_exp2()

Signed-off-by: Aurelien Jarno <>

8443effb 02/24/2010 12:36 am Richard Henderson

target-alpha: Split up FPCR value into separate fields.

The fpcr_exc_status, fpcr_exc_mask, and fpcr_dyn_round fields
are stored in <softfloat.h> format for convenience during
regular execution.

Revert the addition of float_exception_mask to float_status,...

ba0e276d 12/13/2009 09:32 pm Richard Henderson

target-alpha: Fixes for alpha-linux syscalls.

1. Add correct definitions of error numbers.
2. Implement SYS_osf_sigprocmask
3. Implement SYS_osf_get/setsysinfo for IEEE_FP_CONTROL.

This last requires exposing the FPCR value to do_syscall.
Since this value is actually split up into the float_status,...

60011498 11/19/2009 06:45 pm Paul Brook

ARM FP16 support

Implement the ARM VFP half precision floating point extensions.

Signed-off-by: Paul Brook <>

75b5a697 07/27/2009 10:10 pm Juan Quintela

rename NEEDS_LIBSUNMATH to CONFIG_NEEDS_LIBSUNMATH

Once there fix a place where it was misspelled

Signed-off-by: Juan Quintela <>
Signed-off-by: Anthony Liguori <>

e2542fe2 07/27/2009 10:09 pm Juan Quintela

rename WORDS_BIGENDIAN to HOST_WORDS_BIGENDIAN

Signed-off-by: Juan Quintela <>
Signed-off-by: Anthony Liguori <>

71e72a19 07/27/2009 10:09 pm Juan Quintela

rename HOST_BSD to CONFIG_BSD

Signed-off-by: Juan Quintela <>
Signed-off-by: Anthony Liguori <>

dfe5fff3 07/27/2009 10:09 pm Juan Quintela

change HOST_SOLARIS to CONFIG_SOLARIS{_VERSION}

Signed-off-by: Juan Quintela <>
Signed-off-by: Anthony Liguori <>

2734c703 03/08/2009 05:58 pm blueswir1

Rename one more _BSD to HOST_BSD (spotted by Hasso Tepper)

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

374dfc33 02/05/2009 03:42 pm aurel32

soft-float: add float32_log2() and float64_log2()

Signed-off-by: Aurelien Jarno <>

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

196cfc89 02/04/2009 03:52 pm aurel32

softfloat: add a 1.0 constant for float32 and float64

Signed-off-by: Aurelien Jarno <>

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

fe76d976 12/19/2008 04:33 pm pbrook

Implement flush-to-zero mode (denormal results are replaced with zero).

Signed-off-by: Paul Brook <>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6107 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

dadd71a7 12/19/2008 12:43 am aurel32

fp: fix float32_is_infinity()

Thanks to Laurent Desnogues for the hint.

Signed-off-by: Aurelien Jarno <>

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

c52ab6f5 12/15/2008 07:14 pm aurel32

fp: add floatXX_is_infinity(), floatXX_is_neg(), floatXX_is_zero()

Signed-off-by: Aurelien Jarno <>

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

b29fe3ed 11/18/2008 03:42 am malc

Preliminary AIX support

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

1f587329 11/25/2007 08:40 pm blueswir1

128-bit float support for user mode

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3740 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

9ee6e8bb 11/11/2007 02:04 am pbrook

ARMv7 support.

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

924b2c07 05/31/2007 07:17 pm ths

Add proper float*_is_nan prototypes.

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

0475a5ca 04/01/2007 09:54 pm ths

Solaris 9/x86 support, by Ben Taylor.

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

75d62a58 03/21/2007 12:10 am j_mayer

Add missing softfloat helpers.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2518 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

e6e5906b 10/22/2006 03:18 am pbrook

ColdFire target.

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

ec530c81 04/26/2006 01:36 am bellard

Solaris port (Ben Taylor)

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

1d6bda35 03/13/2005 08:52 pm bellard

added abs, chs and compare functions

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1338 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