mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 08:13:54 -06:00
fpu/softfloat: Introduce parts_is_snan_frac
Tested-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
parent
94933df0e5
commit
298b468e43
2 changed files with 17 additions and 10 deletions
|
@ -331,16 +331,8 @@ static FloatParts canonicalize(FloatParts part, const FloatFmt *parm,
|
|||
part.cls = float_class_inf;
|
||||
} else {
|
||||
part.frac <<= parm->frac_shift;
|
||||
#ifdef NO_SIGNALING_NANS
|
||||
part.cls = float_class_qnan;
|
||||
#else
|
||||
int64_t msb = part.frac << 2;
|
||||
if ((msb < 0) == status->snan_bit_is_one) {
|
||||
part.cls = float_class_snan;
|
||||
} else {
|
||||
part.cls = float_class_qnan;
|
||||
}
|
||||
#endif
|
||||
part.cls = (parts_is_snan_frac(part.frac, status)
|
||||
? float_class_snan : float_class_qnan);
|
||||
}
|
||||
} else if (part.exp == 0) {
|
||||
if (likely(part.frac == 0)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue