All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Alex Bennée" <alex.bennee@linaro.org>
To: Joseph Myers <joseph@codesourcery.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [PATCH 3/4] softfloat: fix floatx80 pseudo-denormal comparisons
Date: Sat, 02 May 2020 20:07:15 +0100	[thread overview]
Message-ID: <875zdekvfg.fsf@linaro.org> (raw)
In-Reply-To: <alpine.DEB.2.21.2005012046280.26026@digraph.polyomino.org.uk>


Joseph Myers <joseph@codesourcery.com> writes:

> On Fri, 1 May 2020, Alex Bennée wrote:
>
>> OK - so these only turn up in i386?
>
> Patch 1, silencing sNaN, is about generic semantics of IEEE floating-point 
> conversions (which are implemented correctly in various other cases in 
> QEMU), and would be equally applicable to m68k (I believe, without having 
> m68k hardware to test).
>
> Patches 2 and 3 are i386-specific (just like everything in the existing 
> softfloat code relating to floatx80 subnormals), because m68k interprets 
> biased exponent zero differently.
>
> Patch 4 would apply equally to m68k, because all that matters there is 
> that a certain representation is a small nonzero value, not exactly what 
> value it is.
>
> None of these apply to any other architectures supported by QEMU.
>
>> We have two tests currently (float_convs and float_madds) which
>> currently exercise the various combinations of limits and NaN types
>> using some common float_helpers.c support. Maybe extend it for have a
>> table of the various ext80 types and write a i386 only test case to
>> exercise the functions you fixed?
>
> It seems to me that appropriate tests would be entirely i386-specific (in 
> tests/tcg/i386?).

Yes.

> How are such tests supposed to signal success or 
> failure, since all the tests currently there seem to exit with status 0 
> unconditionally?

Non-zero exit. The float_convs and madds tests always pass but the
second phase is a diff with a reference output which may fails.
Whichever is easier for your test case.

> I do have a test I'm using to check these fixes (in C code for convenience 
> of implementation, with only a little inline asm), but it's not suitable 
> for inclusion as-is, since it includes many tests that currently fail 
> (e.g. for exceptions generated, since the i386 floating-point support in 
> QEMU currently discards exceptions from the softfloat code; one of the 
> things I intend to fix but haven't yet).  It also doesn't yet cover all 
> the problems I think I've found so far in the floating-point support in 
> the i386 port (at least ten such bugs beyond the ones fixed in the present 
> patch series).  And it might well depend on details of compiler code 
> generation to test some of the bugs effectively.

OK - we certainly want to include tests for fixed functionality as we
add it. It's something we are trying to get better at since the big
re-write a few years ago.

-- 
Alex Bennée


      reply	other threads:[~2020-05-02 19:08 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-01  0:39 [PATCH 3/4] softfloat: fix floatx80 pseudo-denormal comparisons Joseph Myers
2020-05-01 19:07 ` Alex Bennée
2020-05-01 19:12   ` Joseph Myers
2020-05-01 19:31     ` Alex Bennée
2020-05-01 21:01       ` Joseph Myers
2020-05-02 19:07         ` Alex Bennée [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=875zdekvfg.fsf@linaro.org \
    --to=alex.bennee@linaro.org \
    --cc=joseph@codesourcery.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.