[prev in list] [next in list] [prev in thread] [next in thread] 

List:       qemu-ppc
Subject:    Re: [PATCH 35/35] test/tcg/ppc64le: Add float reference files
From:       Cédric_Le_Goater <clg () kaod ! org>
Date:       2021-11-29 14:45:20
Message-ID: d7b8a6e0-c82b-32eb-1f50-b514b02032e2 () kaod ! org
[Download RAW message or body]

On 11/22/21 12:16, Richard Henderson wrote:
> On 11/22/21 10:43 AM, Richard Henderson wrote:
> > On 11/21/21 6:47 PM, Cédric Le Goater wrote:
> > > I am getting an error with this test. See below.
> > ...
> > > ### Rounding to nearest
> > > from single: f32(-nan:0xffa00000)
> > > -  to double: f64(-nan:0x00fff4000000000000) (INVALID)
> > > +  to double: f64(-nan:0x00fff4000000000000) (OK)
> > 
> > Well that's disconcerting.
> > 
> > I can replicate this failure on an x86_64 host, but do not see the same error on \
> > a power9 ppc64le host.
> 
> Bah.  The test case is buggy.
> 
> It reads the fpscr for the flags *after* having gone through the printf for the \
> result, at which point you are at the mercy of whatever other fp arithmetic libc \
> chooses to do. 
> Fixed with
> 
> --- a/tests/tcg/multiarch/float_convs.c
> +++ b/tests/tcg/multiarch/float_convs.c
> @@ -51,8 +51,8 @@ static void convert_single_to_double(float input)
> 
> output = input;
> 
> -    out_fmt = fmt_f64(output);
> flag_fmt = fmt_flags();
> +    out_fmt = fmt_f64(output);
> printf("  to double: %s (%s)\n", out_fmt, flag_fmt);
> free(out_fmt);
> free(flag_fmt);
> 
> But this alone of course causes other "failures", because we've got some incorrect \
> reference files.

The only one I have seen so far is on hexagon:

   https://gitlab.com/legoater/qemu/-/jobs/1829273672

C.


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic