qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 13/19] Add VSX ISA2.06 Multiply Add Instructions


From: Richard Henderson
Subject: Re: [Qemu-devel] [PATCH 13/19] Add VSX ISA2.06 Multiply Add Instructions
Date: Fri, 25 Oct 2013 10:29:10 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.0

On 10/25/2013 10:13 AM, Tom Musta wrote:
> On 10/25/2013 11:42 AM, Richard Henderson wrote:
>> I believe that a better implementation could use float*_muladd, and check the
>> result for float_flag_invalid.  If set, compute the intermediate product so 
>> you
>> can figure out the VXISI setting.  But we'd expect that to be an unlikely 
>> path.
> 
> Interesting thought.  I think I see a way to re-arrange the code.  Thanks,
> Richard.

Actually, you don't even have to compute the intermediate product.

The only way you can have VXISI for a*b+c is for

  isinf(c) && (isinf(a) || isinf(b))

since the intermediate product a*b is infinite precision, and thus cannot
overflow to inf unless one of the multiplicands is already inf.


r~



reply via email to

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