]> git.proxmox.com Git - mirror_qemu.git/commit
softfloat: Adjust parts_uncanon_normal for floatx80
authorRichard Henderson <richard.henderson@linaro.org>
Sun, 22 Nov 2020 00:35:54 +0000 (16:35 -0800)
committerRichard Henderson <richard.henderson@linaro.org>
Thu, 3 Jun 2021 21:09:02 +0000 (14:09 -0700)
commit98b3cff7537ad2a9ce0faa6ad0af4191bd066916
tree1268113bf435285c52033e27e75224f3ba155ce4
parent8da5f1dbb0d7b97686d54584c70b55cb05f89007
softfloat: Adjust parts_uncanon_normal for floatx80

With floatx80_precision_x, the rounding happens across
the break between words.  Notice this case with

  frac_lsb = round_mask + 1 -> 0

and check the bits in frac_hi as needed.

In addition, since frac_shift == 0, we won't implicitly clear
round_mask via the right-shift, so explicitly clear those bits.
This fixes rounding for floatx80_precision_[sd].

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
fpu/softfloat-parts.c.inc