[Qemu-devel] [PATCH 0/2] target/sh4: fix fabs and optimize fneg

Aurelien Jarno posted 2 patches 6 years, 9 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20170702163220.8039-1-aurelien@aurel32.net
Test FreeBSD passed
Test checkpatch passed
Test docker passed
Test s390x passed
target/sh4/helper.h    |  3 ---
target/sh4/op_helper.c | 15 ---------------
target/sh4/translate.c | 20 +++++---------------
3 files changed, 5 insertions(+), 33 deletions(-)
[Qemu-devel] [PATCH 0/2] target/sh4: fix fabs and optimize fneg
Posted by Aurelien Jarno 6 years, 9 months ago
This patchset should fix the bug #1701821 reported by Bruno Haible,
which makes the gnulib testsuite to fail for single precision libm
tests.

Aurelien Jarno (2):
  target/sh4: do not check for PR bit for fabs instruction
  target/sh4: do not use a helper to implement fneg

 target/sh4/helper.h    |  3 ---
 target/sh4/op_helper.c | 15 ---------------
 target/sh4/translate.c | 20 +++++---------------
 3 files changed, 5 insertions(+), 33 deletions(-)

-- 
2.11.0


Re: [Qemu-devel] [PATCH 0/2] target/sh4: fix fabs and optimize fneg
Posted by Bruno Haible 6 years, 9 months ago
Hi Aurelien,

> This patchset should fix the bug #1701821 reported by Bruno Haible,
> which makes the gnulib testsuite to fail for single precision libm
> tests.
> 
> Aurelien Jarno (2):
>   target/sh4: do not check for PR bit for fabs instruction
>   target/sh4: do not use a helper to implement fneg

Thanks. It fixes most of the reported issues indeed. The following tests
still fail, though:

$ ~/inst-qemu/2.9.0/bin/qemu-sh4 test-floor2
../../gltests/test-floor2.c:130: assertion 'correct_result_p (x, reference)' failed
qemu: uncaught target signal 6 (Aborted) - core dumped

$ ~/inst-qemu/2.9.0/bin/qemu-sh4 test-round2
reference implementations disagree: round(nan(nan)) = nan(nan) or 0(0x0p+0)?

$ ~/inst-qemu/2.9.0/bin/qemu-sh4 test-roundf2
reference implementations disagree: roundf(nan(nan)) = nan(nan) or 0(0x0p+0)?

But these could also be glibc bugs in the respective functions; I cannot tell.

Bruno


Re: [Qemu-devel] [PATCH 0/2] target/sh4: fix fabs and optimize fneg
Posted by Richard Henderson 6 years, 9 months ago
On 07/02/2017 09:32 AM, Aurelien Jarno wrote:
> This patchset should fix the bug #1701821 reported by Bruno Haible,
> which makes the gnulib testsuite to fail for single precision libm
> tests.
> 
> Aurelien Jarno (2):
>    target/sh4: do not check for PR bit for fabs instruction
>    target/sh4: do not use a helper to implement fneg
> 
>   target/sh4/helper.h    |  3 ---
>   target/sh4/op_helper.c | 15 ---------------
>   target/sh4/translate.c | 20 +++++---------------
>   3 files changed, 5 insertions(+), 33 deletions(-)
> 

Reviewed-by: Richard Henderson <rth@twiddle.net>


r~