mirror of
https://github.com/qemu/qemu.git
synced 2026-07-08 17:46:17 +00:00
fpu: Handle all rounding modes in partsN_round_to_int_normal
Missed float_round_nearest_even_max and float_round_to_odd_inf in both switch statements. Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com> Message-id: 20260608190155.637067-3-richard.henderson@linaro.org Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
committed by
Peter Maydell
parent
a6a1f92d5a
commit
128413ac6d
@@ -1127,6 +1127,7 @@ static bool partsN(round_to_int_normal)(FloatPartsN *a, FloatRoundMode rmode,
|
||||
/* All fractional */
|
||||
switch (rmode) {
|
||||
case float_round_nearest_even:
|
||||
case float_round_nearest_even_max:
|
||||
one = false;
|
||||
if (a->exp == -1) {
|
||||
FloatPartsN tmp;
|
||||
@@ -1149,6 +1150,7 @@ static bool partsN(round_to_int_normal)(FloatPartsN *a, FloatRoundMode rmode,
|
||||
one = a->sign;
|
||||
break;
|
||||
case float_round_to_odd:
|
||||
case float_round_to_odd_inf:
|
||||
one = true;
|
||||
break;
|
||||
default:
|
||||
@@ -1195,6 +1197,7 @@ static bool partsN(round_to_int_normal)(FloatPartsN *a, FloatRoundMode rmode,
|
||||
|
||||
switch (rmode) {
|
||||
case float_round_nearest_even:
|
||||
case float_round_nearest_even_max:
|
||||
inc = ((a->frac_lo & rnd_even_mask) != frac_lsbm1 ? frac_lsbm1 : 0);
|
||||
break;
|
||||
case float_round_ties_away:
|
||||
@@ -1210,6 +1213,7 @@ static bool partsN(round_to_int_normal)(FloatPartsN *a, FloatRoundMode rmode,
|
||||
inc = a->sign ? rnd_mask : 0;
|
||||
break;
|
||||
case float_round_to_odd:
|
||||
case float_round_to_odd_inf:
|
||||
inc = a->frac_lo & frac_lsb ? 0 : rnd_mask;
|
||||
break;
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user