qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH 03/21] softfloat: add xtensa specialization for pickNaNMulAdd


From: Max Filippov
Subject: Re: [PATCH 03/21] softfloat: add xtensa specialization for pickNaNMulAdd
Date: Wed, 8 Jul 2020 11:11:28 -0700

On Wed, Jul 8, 2020 at 9:07 AM Richard Henderson
<richard.henderson@linaro.org> wrote:
>
> On 7/6/20 4:47 PM, Max Filippov wrote:
> > pickNaNMulAdd logic on Xtensa is the same as pickNaN when applied to
> > the expression (a * b) + c. So with two pickNaN variants there must be
> > two pickNaNMulAdd variants.
>
> "Is the same as"?
>
> I question the non-use of the infzero parameter.
>
> When infzero, (a * b) = (Inf * 0), which will produce a default QNaN.  Your
> sentence above would suggest that pickNaN is applied twice, so that if
> use_first_nan, the default nan is chosen above any nan within c.

Apparently the description it's wrong: only NaNs in arguments are
considered, default NaN produced as a result of (a * b) is never
chosen when c is NaN.

> In addition, is the invalid flag raised for (Inf * 0) + NaN?  Does that happen
> regardless of the use_first_nan setting, or does the whole operation 
> short-circuit?

Flag setting happens regardless of which NaN is chosen.
I'll post v3 with a fix for this and additional tests.

-- 
Thanks.
-- Max



reply via email to

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