|
| From: | Richard Henderson |
| Subject: | Re: [PATCH 35/35] test/tcg/ppc64le: Add float reference files |
| Date: | Mon, 22 Nov 2021 12:16:41 +0100 |
| User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 |
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.
r~
| [Prev in Thread] | Current Thread | [Next in Thread] |