qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] tests/tcg: add float_madds test to multiarch


From: Richard Henderson
Subject: Re: [Qemu-devel] [PATCH] tests/tcg: add float_madds test to multiarch
Date: Sat, 14 Sep 2019 14:11:54 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0

On 9/14/19 1:59 PM, Alex Bennée wrote:
> 
> Richard Henderson <address@hidden> writes:
> 
>> On 9/13/19 9:49 AM, Alex Bennée wrote:
>>> +                    /* must be built with -O2 to generate fused op */
>>> +                    r = a * b + c;
>>
>> I would prefer to use fmaf() or __builtin_fmaf() here.
>>
>> Although you'll need to link with -lm just in case the
>> target doesn't support an instruction for fmaf and so
>> the builtin expands to the standard library call.
> 
> I can do that - we have other tests that link to libm.
> 
> I was expecting to see more breakage but the ppc64 tests all passed (or
> at least against the power8 David ran it on). What am I missing to hit
> the cases you know are broken?

I would *expect* the test to pass when run natively on power8 hardware.  Did it
not fail when run via qemu?  If not, then we didn't really choose the argument
sets that are affected by double rounding.

I would expect the inputs that Paul used in the original report to be
candidates.  Otherwise, we should grab some from the glibc fma test case(s).

> I've also experimented with reducing the number of iterations because if
> we want to have golden references we probably don't want to dump several
> hundred kilobytes of "golden" references into the source tree.
> 
>> I also like Paul's suggestion to use hex float constants.
> 
> Hmm I guess - look a bit weird but I guess that's lack of familiarity.
> Is is still normalised? I guess the frac shows up (without the implicit
> bit).

The implicit bit is there: 0x1.xxx.  The representation is always normalized;
you write denormal numbers by using an exponent that would require 
denormalization.


r~



reply via email to

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