mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 08:13:54 -06:00
softfloat: Convert floatx80_round to FloatParts
Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
parent
aa5e19ccbd
commit
45a76b71ab
1 changed files with 6 additions and 4 deletions
|
@ -5792,10 +5792,12 @@ float128 floatx80_to_float128(floatx80 a, float_status *status)
|
||||||
|
|
||||||
floatx80 floatx80_round(floatx80 a, float_status *status)
|
floatx80 floatx80_round(floatx80 a, float_status *status)
|
||||||
{
|
{
|
||||||
return roundAndPackFloatx80(status->floatx80_rounding_precision,
|
FloatParts128 p;
|
||||||
extractFloatx80Sign(a),
|
|
||||||
extractFloatx80Exp(a),
|
if (!floatx80_unpack_canonical(&p, a, status)) {
|
||||||
extractFloatx80Frac(a), 0, status);
|
return floatx80_default_nan(status);
|
||||||
|
}
|
||||||
|
return floatx80_round_pack_canonical(&p, status);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*----------------------------------------------------------------------------
|
/*----------------------------------------------------------------------------
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue