From be53fa785ab766d2722628403edee75b3e6ab599 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Mon, 4 May 2020 23:39:39 +0000 Subject: softfloat: fix floatx80 pseudo-denormal comparisons The softfloat floatx80 comparisons fail to allow for pseudo-denormals, which should compare equal to corresponding values with biased exponent 1 rather than 0. Add an adjustment for that case when comparing numbers with the same sign. Signed-off-by: Joseph Myers Message-Id: Signed-off-by: Richard Henderson --- tests/tcg/i386/test-i386-pseudo-denormal.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'tests') diff --git a/tests/tcg/i386/test-i386-pseudo-denormal.c b/tests/tcg/i386/test-i386-pseudo-denormal.c index cfa2a50..acf2b9c 100644 --- a/tests/tcg/i386/test-i386-pseudo-denormal.c +++ b/tests/tcg/i386/test-i386-pseudo-denormal.c @@ -20,5 +20,9 @@ int main(void) printf("FAIL: pseudo-denormal add\n"); ret = 1; } + if (ld_pseudo_m16382.ld != 0x1p-16382L) { + printf("FAIL: pseudo-denormal compare\n"); + ret = 1; + } return ret; } -- cgit v1.1