From: David Gibson <david@gibson.dropbear.id.au>
To: Richard Henderson <rth@twiddle.net>
Cc: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>,
qemu-ppc@nongnu.org, qemu-devel@nongnu.org,
bharata@linux.vnet.ibm.com
Subject: Re: [Qemu-devel] [PATCH v2] target/ppc: rewrite f[n]m[add, sub] using float64_muladd
Date: Fri, 3 Mar 2017 14:52:16 +1100 [thread overview]
Message-ID: <20170303035216.GQ4067@umbus.fritz.box> (raw)
In-Reply-To: <18786e9b-277c-2a66-1662-55a9325a9d2c@twiddle.net>
[-- Attachment #1: Type: text/plain, Size: 1511 bytes --]
On Fri, Mar 03, 2017 at 02:31:38PM +1100, Richard Henderson wrote:
> On 03/03/2017 01:10 AM, Nikunj A Dadhania wrote:
> > +static void float64_maddsub_update_excp(CPUPPCState *env, float64 arg1,
> > + float64 arg2, float64 arg3,
> > + unsigned int madd_flags)
> > {
> > + if (unlikely((float64_is_infinity(arg1) && float64_is_zero(arg2)) ||
> > + (float64_is_zero(arg1) && float64_is_infinity(arg2)))) {
> > /* Multiplication of zero by infinity */
> > + arg1 = float_invalid_op_excp(env, POWERPC_EXCP_FP_VXIMZ, 1);
> > + } else if (unlikely(float64_is_signaling_nan(arg1, &env->fp_status) ||
> > + float64_is_signaling_nan(arg2, &env->fp_status) ||
> > + float64_is_signaling_nan(arg3, &env->fp_status))) {
> > + /* sNaN operation */
> > + float_invalid_op_excp(env, POWERPC_EXCP_FP_VXSNAN, 1);
>
> Are you sure you shouldn't be testing for NaN first?
> Do you really get VXIMZ if arg3 (the addend) is (S)NaN?
>
> You should probably eliminate QNaN as well, before the other checks.
Oh.. I've already merged and pull requested this. I'm afraid any
further corrections will have to be done as followup patches.
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2017-03-03 4:16 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-02 14:10 [Qemu-devel] [PATCH v2] target/ppc: rewrite f[n]m[add, sub] using float64_muladd Nikunj A Dadhania
2017-03-03 1:18 ` David Gibson
2017-03-03 3:31 ` Richard Henderson
2017-03-03 3:52 ` David Gibson [this message]
2017-03-03 4:22 ` Nikunj A Dadhania
2017-03-03 4:01 ` Nikunj A Dadhania
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=20170303035216.GQ4067@umbus.fritz.box \
--to=david@gibson.dropbear.id.au \
--cc=bharata@linux.vnet.ibm.com \
--cc=nikunj@linux.vnet.ibm.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
--cc=rth@twiddle.net \
/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.