qemu-devel
[Top][All Lists]
Advanced

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

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


From: Nikunj A Dadhania
Subject: Re: [Qemu-devel] [PATCH] target/ppc: rewrite f[n]m[add, sub] using float64_muladd
Date: Wed, 01 Mar 2017 13:50:43 +0530
User-agent: Notmuch/0.21 (https://notmuchmail.org) Emacs/25.0.94.1 (x86_64-redhat-linux-gnu)

Bharata B Rao <address@hidden> writes:

> On Wed, Mar 01, 2017 at 01:14:11PM +0530, Nikunj A Dadhania wrote:
>> Use the softfloat api for fused multiply-add. As we are using the fused
>> multiply-add, the intermediate result for setting VXISI is not
>> available.
>
> Isn't the behaviour of setting VXISI similar to vector muladd instructions ?
> If so refer to VSX_MADD() to see when VXISI is set.

                if ((float64_is_infinity(xa.fld) ||
                     float64_is_infinity(b->fld)) &&
                     float64_is_infinity(c->fld))) {
                   float_invalid_op_excp(env, POWERPC_EXCP_FP_VXISI, sfprf);
               }
               
AFAIU, VXISI is set when (infinity - infinity). The above doesn't take
into consideration about substraction.

>> +FPU_FMADD(fmadd, 0, 0)
>> +FPU_FMADD(fnmadd, 0, 1)
>> +FPU_FMADD(fmsub, float_muladd_negate_c, 0)
>> +FPU_FMADD(fnmsub, float_muladd_negate_c, 1)
>
> May be you could use MADD_FLGS, MSUB_FLGS, NMADD_FLGS and NMSUB_FLGS ?

Sure

Regards
Nikunj




reply via email to

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