History | View | Annotate | Download (243.7 kB)
softfloat: Replace int16 type with int_fast16_t
Based on the following Coccinelle patch:
@typedef int16, int_fast16_t;@-int16+int_fast16_t
@typedef int16, int_fast16_t;
Avoids a workaround for AIX.
Add typedef for pre-10 Solaris.
Signed-off-by: Andreas Färber <afaerber@suse.de>...
softfloat: Replace uint16 type with uint_fast16_t
@typedef uint16, uint_fast16_t;@-uint16+uint_fast16_t
@typedef uint16, uint_fast16_t;
Fixes the build of the Cocoa frontend on Mac OS X and avoids aworkaround for AIX.
For pre-10 Solaris include osdep.h....
softfloat: Fix mixups of int and int16
normalizeFloat{32,64}Subnormal() expect the exponent as int16, not int.This went unnoticed since int16 and uint16 were both typedef'ed to int.
Signed-off-by: Andreas Färber <afaerber@suse.de>Reviewed-by: Peter Maydell <peter.maydell@linaro.org>...
softfloat: make USE_SOFTFLOAT_STRUCT_TYPES compile
This change makes it compile and return the same value than the #undef one.
Signed-off-by: Juan Quintela <quintela@redhat.com>Reviewed-by: Peter Maydell <peter.maydell@linaro.org>Acked-by: Andreas Färber <afaerber@suse.de>...
softfloat: roundAndPackInt{32, 64}: Don't assume int32 is 32 bits
Fix code in roundAndPackInt32 that assumed that int32 was only32 bits, by simply using int32_t instead. Fix the parallel bugin roundAndPackInt64 as well, although that one is only theoretical...
softfloat: float*_to_int32_round_to_zero: don't assume int32 is 32 bits
Code in the float64_to_int32_round_to_zero() function was assumingthat int32 would not be wider than 32 bits; this meant it mightnot correctly detect the overflow case. We take the simple approach...
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 isspecified in IEEE 754-2008 and implemented in a number of CPUs.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
softfloat: Reinstate accidentally disabled target-specific NaN handling
Include config.h in softfloat.c, so that the target specific ifdefs insoftfloat-specialize.h are evaluated correctly. This was accidentallybroken in commit 789ec7ce2 when config-target.h was removed from...
softfloat: Use uint32 consistently
Prepares for uint32 replacement.
Signed-off-by: Andreas Färber <andreas.faerber@web.de>Reviewed-by: Peter Maydell <peter.maydell@linaro.org>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
softfloat: Use uint16 consistently
Prepares for uint16 replacement.
softfloat: always enable floatx80 and float128 support
Now that softfloat-native is gone, there is no real point on not alwaysenabling floatx80 and float128 support.
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
softfloat: Add new flag for when denormal result is flushed to zero
Add a new float_flag_output_denormal which is set when the resultof a floating point operation would be denormal but is flushed tozero because we are in flush_to_zero mode. This is necessary because...
softfloat: fix float*_scalnb() corner cases
float*_scalnb() were not taking into account all cases. This patch fixessome corner cases:- NaN values in input were not properly propagated and the invalid flag not correctly raised. Use propagateFloat*NaN() for that....
softfloat: add floatx80_compare*() functions
Add floatx80_compare() and floatx80_compare_quiet() functions to matchthe softfloat-native ones.
softfloat: move float*_eq and float*_eq_quiet
I am not a big fan of code moving, but having the signaling version inthe middle of quiet versions and vice versa doesn't make the code easyto read.
This patch is a simple code move, basically swapping locations of...
softfloat: improve description of comparison functions
Make clear for all comparison functions which ones trigger an exceptionfor all NaNs, and which one only for sNaNs.
softfloat: add float*_unordered_{,quiet}() functions
Add float*_unordered() functions to softfloat, matching the softfloat-nativeones. Also add float*_unordered_quiet() functions to match the otherscomparison functions.
This allow target-i386/ops_sse.h to be compiled with softfloat....
softfloat: rename float*_eq() into float*_eq_quiet()
float*_eq functions have a different semantics than other comparisonfunctions. Fix that by first renaming float*_quiet() into float*_eq_quiet().
Note that it is purely mechanical, and the behaviour should be unchanged....
softfloat: rename float*_eq_signaling() into float*_eq()
float*_eq_signaling functions have a different semantics than othercomparison functions. Fix that by renaming float*_quiet_signaling() intofloat*_eq().
softfloat: Add float*_min() and float*_max() functions
Add min and max operations to softfloat. This allows us to implementpropagation of NaNs and handling of negative zero correctly (unlikethe approach of having target helper routines return one of the operands...
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 <peter.maydell@linaro.org>Cc: Aurelien Jarno <aurelien@aurel32.net>...
softfloat: Prepend QEMU-style header with derivation notice
The SoftFloat license requires "prominent notice that the workis derivative". Having added features like improved 16-bit supportfor arm already, add such a notice to the sources.
softfloat-native.[ch] are not under the SoftFloat license...
softfloat: Fix compilation failures with USE_SOFTFLOAT_STRUCT_TYPES
Make softfloat compile with USE_SOFTFLOAT_STRUCT_TYPES defined, byadding and using new macros const_float16(), const_float32() andconst_float64() so you can use array initializers in an array of...
softfloat: Correctly handle NaNs in float16_to_float32()
Correctly handle NaNs in float16_to_float32(), by defining andusing a float16ToCommonNaN() function, as we do with the other formats.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
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...
softfloat: Honour default_nan_mode for float-to-float conversions
Honour the default_nan_mode flag when doing conversions betweendifferent floating point formats, as well as when returning a NaN froma two-operand floating point function. This corrects the behaviour...
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....
softfloat: Implement flushing input denormals to zero
Add support to softfloat for flushing input denormal float32 and float64to zero. softfloat's existing 'flush_to_zero' flag only flushes denormalsto zero on output. Some CPUs need input denormals to be flushed before...
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 requirementto saturate at 16 bit MAXINT/MININT and to get the exception bits right.)...
softfloat: add float32_exp2()
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
softfloat: remove dead assignments, spotted by clang
Value stored to 'bSign' is never read.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
ARM FP16 support
Implement the ARM VFP half precision floating point extensions.
Signed-off-by: Paul Brook <paul@codesourcery.com>
soft-float: add float32_log2() and float64_log2()
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6518 c046a42c-6fe2-441c-8c8c-71466251a162
Implement flush-to-zero mode (denormal results are replaced with zero).
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6107 c046a42c-6fe2-441c-8c8c-71466251a162
Correctly normalize values and handle zero inputs to scalbn functions.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6102 c046a42c-6fe2-441c-8c8c-71466251a162
Suppress gcc 4.x -Wpointer-sign (included in -Wall) warnings
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5275 c046a42c-6fe2-441c-8c8c-71466251a162
128-bit float support for user mode
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3740 c046a42c-6fe2-441c-8c8c-71466251a162
Fix more typos in softloat code (Eduardo Felipe)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3716 c046a42c-6fe2-441c-8c8c-71466251a162
Fix typo in softfloat code.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3714 c046a42c-6fe2-441c-8c8c-71466251a162
Add strict checking mode for softfp code.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3688 c046a42c-6fe2-441c-8c8c-71466251a162
ARMv7 support.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3572 c046a42c-6fe2-441c-8c8c-71466251a162
Ooops... Typo.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2520 c046a42c-6fe2-441c-8c8c-71466251a162
Add missing softfloat helpers.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2518 c046a42c-6fe2-441c-8c8c-71466251a162
avoid using char when it is not necessary
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2204 c046a42c-6fe2-441c-8c8c-71466251a162
ColdFire target.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2196 c046a42c-6fe2-441c-8c8c-71466251a162
added abs, chs and compare functions
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1338 c046a42c-6fe2-441c-8c8c-71466251a162
soft float support
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1332 c046a42c-6fe2-441c-8c8c-71466251a162