From: Peter Maydell <peter.maydell@linaro.org>
To: Richard Henderson <richard.henderson@linaro.org>
Cc: "Emilio G. Cota" <cota@braap.org>,
"Bastian Koppelmann" <kbastian@mail.uni-paderborn.de>,
"Alex Bennée" <alex.bennee@linaro.org>,
"QEMU Developers" <qemu-devel@nongnu.org>,
"Aurelien Jarno" <aurelien@aurel32.net>
Subject: Re: [Qemu-devel] [PATCH] fpu/softfloat: check for Inf / x or 0 / x before /0
Date: Wed, 18 Apr 2018 00:01:11 +0100 [thread overview]
Message-ID: <CAFEAcA_2=rYDZ7yVEHrENzWYsdDHf8DFba9ymffsVwHXvVP4ew@mail.gmail.com> (raw)
In-Reply-To: <cee77754-64f5-e4e2-6462-f70603655e3e@linaro.org>
On 17 April 2018 at 23:49, Richard Henderson
<richard.henderson@linaro.org> wrote:
> On 04/17/2018 12:38 PM, Emilio G. Cota wrote:
>> On Tue, Apr 17, 2018 at 22:45:51 +0100, Peter Maydell wrote:
>>> On 17 April 2018 at 22:27, Emilio G. Cota <cota@braap.org> wrote:
>>>> (...)
>>>> +cff 0xffb00000, expected: 0x7ff8000000000000, returned: 0x7ff4000000000000, \
>>>> expected exceptions: i, returned: none
>>>> +error: flags mismatch for input @ ibm/Basic-Types-Inputs.fptest:26170:
>>>> +b32b64cff =0 S -> Q i
>>>
>>> SNaN conversion from 32 bit to 64 bit. Here I agree
>>> with the test -- we should quieten the NaN and raise
>>> Invalid -- which implies that the hardware is wrong ?!?
>>
>> This passes on an Intel host, and fails on both Power7 and 8 hosts I have
>> access to. I don't have the Power ISA spec in front of me, but I hope
>> there's something about this specified in it.
>
> IIRC this is unspecified and does vary by implementation.
I think 754-2008 does specify it: s6.2 says that you get
'set Invalid and return a QNaN if an input is an SNaN' for
"every general-computational and signaling-computational
operation except for the conversions described in 5.12".
So the only exceptions are:
1) the s5.12 conversions, which are to/from strings-of-characters
2) quiet-computational operations, which are just
copy, abs, negate, copySign, and some re-encoding
operations involving decimal formats
float-to-float conversions are general-computational.
I don't have the original IEEE754 spec to hand though;
that may have left this unspecified.
thanks
-- PMM
next prev parent reply other threads:[~2018-04-17 23:01 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-16 13:54 [Qemu-devel] [PATCH] fpu/softfloat: check for Inf / x or 0 / x before /0 Alex Bennée
2018-04-16 14:16 ` Bastian Koppelmann
2018-04-16 14:42 ` Alex Bennée
2018-04-16 14:45 ` Peter Maydell
2018-04-16 19:39 ` Richard Henderson
2018-04-17 8:56 ` Peter Maydell
2018-04-17 8:57 ` Peter Maydell
2018-04-17 19:04 ` Emilio G. Cota
2018-04-17 20:54 ` Peter Maydell
2018-04-17 21:27 ` Emilio G. Cota
2018-04-17 21:45 ` Peter Maydell
2018-04-17 22:38 ` Emilio G. Cota
2018-04-17 22:49 ` Richard Henderson
2018-04-17 23:01 ` Peter Maydell [this message]
2018-04-17 23:08 ` Peter Maydell
2018-04-19 19:06 ` Richard Henderson
2018-04-19 19:12 ` Richard Henderson
2018-04-19 19:23 ` Peter Maydell
2018-04-20 8:20 ` Alex Bennée
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='CAFEAcA_2=rYDZ7yVEHrENzWYsdDHf8DFba9ymffsVwHXvVP4ew@mail.gmail.com' \
--to=peter.maydell@linaro.org \
--cc=alex.bennee@linaro.org \
--cc=aurelien@aurel32.net \
--cc=cota@braap.org \
--cc=kbastian@mail.uni-paderborn.de \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).