softfloat: Use return_nan in float_to_float

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>
This commit is contained in:
Richard Henderson 2020-10-22 10:48:48 -07:00
parent 134eda00e9
commit 0d40cd939a

View File

@ -1931,13 +1931,7 @@ static FloatParts float_to_float(FloatParts a, const FloatFmt *dstf,
break;
}
} else if (is_nan(a.cls)) {
if (is_snan(a.cls)) {
float_raise(float_flag_invalid, s);
a = parts_silence_nan(a, s);
}
if (s->default_nan_mode) {
return parts_default_nan(s);
}
return return_nan(a, s);
}
return a;
}