mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 08:43:55 -06:00
softfloat: Add float_round_nearest_even_max
This rounding mode is used by Hexagon. Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
parent
6a243913aa
commit
72330260cd
2 changed files with 5 additions and 0 deletions
|
@ -241,6 +241,9 @@ static void partsN(uncanon_normal)(FloatPartsN *p, float_status *s,
|
|||
int exp, flags = 0;
|
||||
|
||||
switch (s->float_rounding_mode) {
|
||||
case float_round_nearest_even_max:
|
||||
overflow_norm = true;
|
||||
/* fall through */
|
||||
case float_round_nearest_even:
|
||||
if (N > 64 && frac_lsb == 0) {
|
||||
inc = ((p->frac_hi & 1) || (p->frac_lo & round_mask) != frac_lsbm1
|
||||
|
|
|
@ -140,6 +140,8 @@ typedef enum __attribute__((__packed__)) {
|
|||
float_round_to_odd = 5,
|
||||
/* Not an IEEE rounding mode: round to closest odd, overflow to inf */
|
||||
float_round_to_odd_inf = 6,
|
||||
/* Not an IEEE rounding mode: round to nearest even, overflow to max */
|
||||
float_round_nearest_even_max = 7,
|
||||
} FloatRoundMode;
|
||||
|
||||
/*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue