softfloat: fix floatx80 pseudo-denormal addition / subtraction
commit41602807766e253ccb6fb761f3ff12767f786e2c
authorJoseph Myers <joseph@codesourcery.com>
Mon, 4 May 2020 23:38:44 +0000 (4 23:38 +0000)
committerRichard Henderson <richard.henderson@linaro.org>
Fri, 15 May 2020 18:04:50 +0000 (15 11:04 -0700)
tree45d0d63bc499fbe670848855eb250d3979da3ae9
parent7537c2b4a363237534c96d089a02b0712b49d890
softfloat: fix floatx80 pseudo-denormal addition / subtraction

The softfloat function addFloatx80Sigs, used for addition of values
with the same sign and subtraction of values with opposite sign, fails
to handle the case where the two values both have biased exponent zero
and there is a carry resulting from adding the significands, which can
occur if one or both values are pseudo-denormals (biased exponent
zero, explicit integer bit 1).  Add a check for that case, so making
the results match those seen on x86 hardware for pseudo-denormals.

Signed-off-by: Joseph Myers <joseph@codesourcery.com>
Message-Id: <alpine.DEB.2.21.2005042337570.22972@digraph.polyomino.org.uk>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
fpu/softfloat.c
tests/tcg/i386/test-i386-pseudo-denormal.c [new file with mode: 0644]