diff options
author | Richard Henderson <richard.henderson@linaro.org> | 2020-10-22 09:23:46 -0700 |
---|---|---|
committer | Richard Henderson <richard.henderson@linaro.org> | 2021-05-16 07:13:51 -0500 |
commit | a777d6033447a916620846d3a65bc64a0617b574 (patch) | |
tree | 39613ebe5b9262f1de71abdaa181a9742cfb67b7 /fpu/softfloat-specialize.c.inc | |
parent | e9e5534ff30a0441d2efa59004e3f815177e7c10 (diff) |
softfloat: Do not produce a default_nan from parts_silence_nan
Require default_nan_mode to be set instead.
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: David Hildenbrand <david@redhat.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'fpu/softfloat-specialize.c.inc')
-rw-r--r-- | fpu/softfloat-specialize.c.inc | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/fpu/softfloat-specialize.c.inc b/fpu/softfloat-specialize.c.inc index 96ed8c1a26..05cb2ee940 100644 --- a/fpu/softfloat-specialize.c.inc +++ b/fpu/softfloat-specialize.c.inc @@ -179,16 +179,15 @@ static FloatParts parts_default_nan(float_status *status) static FloatParts parts_silence_nan(FloatParts a, float_status *status) { g_assert(!no_signaling_nans(status)); -#if defined(TARGET_HPPA) - a.frac &= ~(1ULL << (DECOMPOSED_BINARY_POINT - 1)); - a.frac |= 1ULL << (DECOMPOSED_BINARY_POINT - 2); -#else + g_assert(!status->default_nan_mode); + + /* The only snan_bit_is_one target without default_nan_mode is HPPA. */ if (snan_bit_is_one(status)) { - return parts_default_nan(status); + a.frac &= ~(1ULL << (DECOMPOSED_BINARY_POINT - 1)); + a.frac |= 1ULL << (DECOMPOSED_BINARY_POINT - 2); } else { a.frac |= 1ULL << (DECOMPOSED_BINARY_POINT - 1); } -#endif a.cls = float_class_qnan; return a; } |