On 17/10/26 02:58, Matt Turner wrote:
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.

We need the float_* tests fixed to get this series merged, re-generate?

93/1938 tcg+tcg-alpha-linux-user - qemu:alpha-linux-user-float_convd FAIL 0.03s exit status 1 < to single: f32(0x0.00000000000000000000p+0:0000000000) (UNDERFLOW INEXACT )
<    to int32: 0 (INEXACT )
<    to int64: 0 (INEXACT )
<   to uint32: 0 (INEXACT )
<   to uint64: 0 (INEXACT )
---
>   to single: f32(0x0.00000000000000000000p+0:0000000000) (UNDERFLOW )
>    to int32: 0 (OK)
>    to int64: 0 (OK)
>   to uint32: 0 (OK)
>   to uint64: 0 (OK)
870,874c870,874
...

Signed-off-by: Matt Turner <[email protected]>
---
Changes in v2:
- Patch 2: fold the underflow check into soft_to_fpcr_exc, which now
   takes whether the delivered result is normal, instead of adding
   soft_to_fpcr_exc_tiny.
- Patch 2: check float_flag_input_denormal_used for CONFIG_USER_ONLY
   only.
- Link to v1: 
https://lore.kernel.org/qemu-devel/[email protected]

---
Matt Turner (2):
       target/alpha: Record masked exceptions in FPCR for /S insns

Reply via email to