From: Aurelien Jarno <aurelien@aurel32.net>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 2/6] softfloat: fix float{32, 64}_maybe_silence_nan() for MIPS
Date: Mon, 03 Jan 2011 16:24:50 +0100 [thread overview]
Message-ID: <4D21EA42.7070106@aurel32.net> (raw)
In-Reply-To: <AANLkTi=LZPUK1sdUuGJCC2WnQVz25-OR7z1MmtCrfgFT@mail.gmail.com>
Peter Maydell a écrit :
> On 3 January 2011 14:34, Aurelien Jarno <aurelien@aurel32.net> wrote:
>> On targets that define sNaN with the sNaN bit as one, simply clearing
>> this bit may correspond to an infinite value.
>>
>> Convert it to a default NaN if SNAN_BIT_IS_ONE, as it corresponds to
>> the MIPS implementation, the only emulated CPU with SNAN_BIT_IS_ONE.
>> When other CPU of this type are added, this might be updated to include
>> more cases.
>
> This patch doesn't apply to master:
>
>> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
>> ---
>> fpu/softfloat-specialize.h | 12 ++++++------
>> 1 files changed, 6 insertions(+), 6 deletions(-)
>>
>> diff --git a/fpu/softfloat-specialize.h b/fpu/softfloat-specialize.h
>> index f23bd6a..31481e7 100644
>> --- a/fpu/softfloat-specialize.h
>> +++ b/fpu/softfloat-specialize.h
>> @@ -107,13 +107,13 @@ int float32_is_signaling_nan( float32 a_ )
>> float32 float32_maybe_silence_nan( float32 a_ )
>> {
>> if (float32_is_signaling_nan(a_)) {
>> - bits32 a = float32_val(a_);
>
> ...on master this line is
> uint32_t a = float32_val(a_);
>
> (different type) so the patch doesn't apply.
Oops, yes, my patch series should have started by a patch fixing types,
but i made a mistake selecting the commits to send. Will fix that in a v2.
> Other than that, looks OK. I think I'd like a comment somewhere
> along the lines of
> /* Rules for silencing a signaling NaN are target-specific. Typically
> * targets with !SNAN_BIT_IS_ONE use the rule that the NaN
> * is silenced by setting the bit. Targets where SNAN_BIT_IS_ONE
> * must do something more complicated, because clearing the
> * bit might turn a NaN into an infinity. This code is correct for
> * MIPS but new targets might need something different.
> */
>
> Or you could have the #ifdefs be on TARGET_whatever so
> that it's clear (because it won't compile) that adding a new
> TARGET_FOO means you have to check behaviour in this
> area. But I don't feel very strongly about that.
>
Ok, thanks for the review, will fix that.
--
Aurelien Jarno GPG: 1024D/F1BCDB73
aurelien@aurel32.net http://www.aurel32.net
next prev parent reply other threads:[~2011-01-03 15:24 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-03 14:34 [Qemu-devel] softfloat: fix NaN propagation for MIPS and PowerPC + cleanup Aurelien Jarno
2011-01-03 14:34 ` [Qemu-devel] [PATCH 1/6] softfloat: remove HPPA specific code Aurelien Jarno
2011-01-03 15:22 ` Peter Maydell
2011-01-03 15:26 ` Aurelien Jarno
2011-01-04 19:54 ` Andreas Färber
2011-01-04 20:07 ` Aurelien Jarno
2011-01-04 22:53 ` Andreas Färber
2011-01-04 23:56 ` Aurelien Jarno
2011-01-05 8:15 ` Andreas Färber
2011-01-05 10:21 ` Aurelien Jarno
2011-01-05 23:13 ` Stuart Brady
2011-01-06 8:58 ` Peter Maydell
2011-01-06 18:13 ` Stuart Brady
2011-01-06 18:43 ` Peter Maydell
2011-01-06 19:25 ` Stuart Brady
2011-01-06 14:35 ` Aurelien Jarno
2011-01-06 15:34 ` Peter Maydell
2011-01-06 18:48 ` Aurelien Jarno
2011-01-06 21:19 ` Peter Maydell
2011-01-06 21:31 ` Aurelien Jarno
2011-01-06 19:26 ` Nathan Froyd
2011-01-06 13:10 ` Andreas Färber
2011-01-06 15:08 ` Aurelien Jarno
2011-01-03 14:34 ` [Qemu-devel] [PATCH 2/6] softfloat: fix float{32, 64}_maybe_silence_nan() for MIPS Aurelien Jarno
2011-01-03 15:15 ` Peter Maydell
2011-01-03 15:24 ` Aurelien Jarno [this message]
2011-01-03 14:34 ` [Qemu-devel] [PATCH 3/6] softfloat: add float{x80, 128}_maybe_silence_nan() Aurelien Jarno
2011-01-03 15:33 ` Peter Maydell
2011-01-03 14:34 ` [Qemu-devel] [PATCH 4/6] softfloat: use float{32, 64, x80, 128}_maybe_silence_nan() Aurelien Jarno
2011-01-03 17:34 ` Peter Maydell
2011-01-03 22:44 ` Aurelien Jarno
2011-01-03 14:34 ` [Qemu-devel] [PATCH 5/6] target-mips: Implement correct NaN propagation rules Aurelien Jarno
2011-01-03 14:34 ` [Qemu-devel] [PATCH 6/6] target-ppc: " Aurelien Jarno
2011-01-05 12:45 ` Nathan Froyd
2011-01-05 17:24 ` [Qemu-devel] " Alexander Graf
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=4D21EA42.7070106@aurel32.net \
--to=aurelien@aurel32.net \
--cc=peter.maydell@linaro.org \
--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 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).