qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v2] target/ppc: rewrite f[n]m[add, sub] using fl


From: David Gibson
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
User-agent: Mutt/1.7.1 (2016-10-04)

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: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]