Message ID | 20210508014802.892561-15-richard.henderson@linaro.org |
---|---|
State | Superseded |
Headers | show |
Series | Convert floatx80 and float128 to FloatParts | expand |
On 08.05.21 03:47, Richard Henderson wrote: > Require default_nan_mode to be set instead. > > Signed-off-by: Richard Henderson <richard.henderson@linaro.org> > --- > fpu/softfloat-specialize.c.inc | 11 +++++------ > 1 file changed, 5 insertions(+), 6 deletions(-) > > diff --git a/fpu/softfloat-specialize.c.inc b/fpu/softfloat-specialize.c.inc > index 487b29155c..5988830c16 100644 > --- a/fpu/softfloat-specialize.c.inc > +++ b/fpu/softfloat-specialize.c.inc > @@ -180,16 +180,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; > } > Reviewed-by: David Hildenbrand <david@redhat.com> -- Thanks, David / dhildenb
Richard Henderson <richard.henderson@linaro.org> writes: > Require default_nan_mode to be set instead. > > Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> -- Alex Bennée
diff --git a/fpu/softfloat-specialize.c.inc b/fpu/softfloat-specialize.c.inc index 487b29155c..5988830c16 100644 --- a/fpu/softfloat-specialize.c.inc +++ b/fpu/softfloat-specialize.c.inc @@ -180,16 +180,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; }
Require default_nan_mode to be set instead. Signed-off-by: Richard Henderson <richard.henderson@linaro.org> --- fpu/softfloat-specialize.c.inc | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) -- 2.25.1