Two fixes for the exception status that qemu-alpha reports to code
built with gcc -mieee.  I found both running glibc's math tests under
linux-user.

Patch 1 fixes 471d493047, which was meant to record masked exceptions
in the FPCR but had no effect for insns with software completion.
Without it FE_INEXACT is never set for -mieee code.

Patch 2 makes underflow match the hardware for a result that rounds up
to the smallest normal number.  Alpha raises no underflow there and
softfloat does.

Patch 1 does not depend on patch 2.

Tested with linux-user only; system mode is untested.

glibc's math tests (make check subdirs=math), run under linux-user:

            PASS  FAIL  XFAIL
  master    1400   110      1
  series    1510     0      1

Nearly all of the failures on master are 'Exception "Inexact" not
set'.  The XFAIL is test-float32x-float64-div.  On master it fails for
missing inexact; with the series it fails only the four
div_{upward,downward}_double cases that glibc expects to fail on
Alpha.

The tcg-alpha-linux-user suite has six failures (float_convs,
float_convd, float_madds and a plugin variant of each).  They fail the
same way on master.

Signed-off-by: Matt Turner <[email protected]>
---
Matt Turner (2):
      target/alpha: Record masked exceptions in FPCR for /S insns
      target/alpha: Determine tininess from the delivered result

 target/alpha/fpu_helper.c | 46 ++++++++++++++++++++++++++++++++++++----------
 1 file changed, 36 insertions(+), 10 deletions(-)
---
base-commit: 615ece3c406b262996e569f29ea6eed0d81c4d8d
change-id: 20261012-alpha-fpcr-status-s-5b5c42702cfc

Best regards,
-- 
Matt Turner <[email protected]>


Reply via email to