qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [RFC] alpha qemu arithmetic exceptions


From: Al Viro
Subject: Re: [Qemu-devel] [RFC] alpha qemu arithmetic exceptions
Date: Sat, 5 Jul 2014 02:40:55 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

        Denorms fun:

a) softfloat.c raises flags we don't care about.  So checking that
FP_STATUS.float_exception_flags is non-zero is *not* good - we catch
false positives that way.

b) DNZ has effect *only* for /S insns.  Without /S denorm means INV and
that's it.  FPCR.INV isn't set, at that.  FPCR.INVD is ignored (it affects
only insns with /S).

c) without DNZ or DNOD denorms trip INV even with /S.  Again, FPCR.INV is
not set *and* FPCR.INVD is ignored.  It does stop INV from SQRTT/SU on
-1, but not on DBL_MIN/2 (and on SQRTT/SU(-1) FPCR.INV is set).  Looks like
this sucker is a separate kind of trap, the only similarity with INV being
that it sets the same bit in trap summary word.

d) at least on EV6 and EV67 DNOD *still* trips INV.  According to the
manual suppression of INV by DNOD is optional.  And while their text
might be interpreted as "INV is suppressed if operation with denorm
wouldn't result in something unpleasant" (which would apply to
sqrt(DBL_MIN/2)), the same behaviour happens on DBL_MIN/2 + DBL_MIN/2,
where the result is a good finite value, so it really looks like DNOD
doesn't suppress INV at all on these processors.

Does anybody have 21364 to run some tests on?

FWIW, hw testing had been done by direct printk from do_entArith(); it's
before anything alpha_fpu_emu() does.

Right now I have duplicate of 21264 SQRTT behaviour on everything except
infinities; hadn't looked into those yet.  I'm going to massage it a bit
and see if the result causes any regressions for corner cases of MULT
and friends.  Hopefully I'll have something usable by tomorrow...

Al, wondering if the original regression testsuite still exists somewhere in
the bowels of Intel - DEC/Compaq/HP had to have one for testing the hardware
back then...



reply via email to

[Prev in Thread] Current Thread [Next in Thread]