From: "Alex Bennée" <alex.bennee@linaro.org>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: QEMU Developers <qemu-devel@nongnu.org>,
Bastian Koppelmann <kbastian@mail.uni-paderborn.de>,
Aurelien Jarno <aurelien@aurel32.net>
Subject: Re: [Qemu-devel] [PATCH v1 2/2] fpu/softfloat: raise float_invalid for NaN in float_to_int
Date: Thu, 12 Apr 2018 14:23:42 +0100 [thread overview]
Message-ID: <87muy8much.fsf@linaro.org> (raw)
In-Reply-To: <CAFEAcA_9F3s5h8r-BGF2K_3-qgs7qUzpQQpjwtn+CdgUF-9zkg@mail.gmail.com>
Peter Maydell <peter.maydell@linaro.org> writes:
> On 12 April 2018 at 12:58, Alex Bennée <alex.bennee@linaro.org> wrote:
>> Fixes https://bugs.launchpad.net/qemu/+bug/1759264
>>
>> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
>> Cc: Bastian Koppelmann <kbastian@mail.uni-paderborn.de>
>> ---
>> fpu/softfloat.c | 1 +
>> 1 file changed, 1 insertion(+)
>>
>> diff --git a/fpu/softfloat.c b/fpu/softfloat.c
>> index 9b99aa6ec8..ddc77c273c 100644
>> --- a/fpu/softfloat.c
>> +++ b/fpu/softfloat.c
>> @@ -1344,6 +1344,7 @@ static int64_t round_to_int_and_pack(FloatParts in, int rmode,
>> case float_class_qnan:
>> case float_class_dnan:
>> case float_class_msnan:
>> + s->float_exception_flags = orig_flags | float_flag_invalid;
>> return max;
>> case float_class_inf:
>> return p.sign ? min : max;
>
> Don't we also need to raise the Invalid flag for float_class_inf ?
>
> In both cases, this is fixing a regression introduced in
> commit ab52f973a50, I think.
And I guess the round_to_uint_and_pack as well which doesn't handle the
input inf case.
>
> thanks
> -- PMM
--
Alex Bennée
prev parent reply other threads:[~2018-04-12 13:23 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-12 11:58 [Qemu-devel] [PATCH v1 0/2] Softfloat Fixes for 2.12 Alex Bennée
2018-04-12 11:58 ` [Qemu-devel] [PATCH v1 1/2] softfloat: fix {min, max}nummag for same-abs-value inputs Alex Bennée
2018-04-12 11:58 ` [Qemu-devel] [PATCH v1 2/2] fpu/softfloat: raise float_invalid for NaN in float_to_int Alex Bennée
2018-04-12 12:26 ` Peter Maydell
2018-04-12 12:34 ` Bastian Koppelmann
2018-04-12 13:23 ` 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=87muy8much.fsf@linaro.org \
--to=alex.bennee@linaro.org \
--cc=aurelien@aurel32.net \
--cc=kbastian@mail.uni-paderborn.de \
--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).