From: Xiangyu Hu <libhu.so@gmail.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: QEMU Developers <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH] FMULX should flushes operators to zero when FZ is set.
Date: Wed, 28 Jan 2015 23:42:53 +0800 [thread overview]
Message-ID: <6A6F6FD2-893C-47E6-BCE5-6AA86F578875@gmail.com> (raw)
In-Reply-To: <CAFEAcA_BvhHcvDcAZXwbsDuL65-r26otdjWy-wn_s9tftPd48w@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 2063 bytes --]
Thanks Peter.
I have sent another patch with updated commit message.
- xiangyu
> On 28 Jan, 2015, at 10:54 pm, Peter Maydell <peter.maydell@linaro.org> wrote:
>
> On 28 January 2015 at 14:51, Xiangyu Hu <libhu.so@gmail.com <mailto:libhu.so@gmail.com>> wrote:
>> The difference between FMULX and FMUL is that FMULX will return 2.0f when one operator is
>> FPInfinity and the other one is FPZero, whilst FMUL will return a Default NaN. Without
>> this patch, the emulation would result in inconsistency.
>>
>> Signed-off-by: Xiangyu Hu <libhu.so@gmail.com>
>> ---
>> target-arm/helper-a64.c | 6 ++++++
>> 1 file changed, 6 insertions(+)
>>
>> diff --git a/target-arm/helper-a64.c b/target-arm/helper-a64.c
>> index 81066ca..ebd9247 100644
>> --- a/target-arm/helper-a64.c
>> +++ b/target-arm/helper-a64.c
>> @@ -135,6 +135,9 @@ float32 HELPER(vfp_mulxs)(float32 a, float32 b, void *fpstp)
>> {
>> float_status *fpst = fpstp;
>>
>> + a = float32_squash_input_denormal(a, fpst);
>> + b = float32_squash_input_denormal(b, fpst);
>> +
>> if ((float32_is_zero(a) && float32_is_infinity(b)) ||
>> (float32_is_infinity(a) && float32_is_zero(b))) {
>> /* 2.0 with the sign bit set to sign(A) XOR sign(B) */
>> @@ -148,6 +151,9 @@ float64 HELPER(vfp_mulxd)(float64 a, float64 b, void *fpstp)
>> {
>> float_status *fpst = fpstp;
>>
>> + a = float64_squash_input_denormal(a, fpst);
>> + b = float64_squash_input_denormal(b, fpst);
>> +
>> if ((float64_is_zero(a) && float64_is_infinity(b)) ||
>> (float64_is_infinity(a) && float64_is_zero(b))) {
>> /* 2.0 with the sign bit set to sign(A) XOR sign(B) */
>
> I think this code change is correct but the commit message doesn't
> do a very good job of describing what the change is or why it is
> needed... (in particular the difference between FMULX and FMUL is
> completely irrelevant to the need for this fix, but it is pretty
> much the only thing the commit message talks about).
>
> thanks
> -- PMM
[-- Attachment #2: Type: text/html, Size: 10315 bytes --]
next prev parent reply other threads:[~2015-01-28 15:43 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-28 14:51 [Qemu-devel] [PATCH] FMULX should flushes operators to zero when FZ is set Xiangyu Hu
2015-01-28 14:54 ` Peter Maydell
2015-01-28 15:42 ` Xiangyu Hu [this message]
2015-01-28 15:54 ` Alex Bennée
2015-01-28 15:57 ` Peter Maydell
2015-01-28 16:11 ` Xiangyu Hu
2015-01-28 16:12 ` Claudio Fontana
2015-01-28 16:25 ` Peter Maydell
2015-01-29 19:22 ` Peter Maydell
2015-02-03 13:44 ` 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=6A6F6FD2-893C-47E6-BCE5-6AA86F578875@gmail.com \
--to=libhu.so@gmail.com \
--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).