Commit f69f5f7963 for qemu.org
commit f69f5f796309c613c2677c553824ec30b0712409
Author: Eric Farman <farman@linux.ibm.com>
Date: Mon Oct 19 20:56:00 2026 +0200
tests/tcg/ppc64: Run float_conv* against power8
There is an oddity that turns up with the float_convd and float_convs
tests, when running from different toolchains. As one example, the
expectation at the start of tests/tcg/ppc64/float_conv*.ref is:
### Rounding to nearest
from double: f64(nan:0x007ff4000000000000)
to single: f32(nan:0x7fe00000) (INVALID)
to int32: -2147483648 (INVALID)
to int64: -9223372036854775808 (INVALID)
to uint32: 0 (INVALID)
to uint64: -9223372036854775808 (INVALID)
But, other hosts offer a different response, e.g., this debian guest
on my laptop:
### Rounding to nearest
from double: f64(nan:0x007ff4000000000000)
to single: f32(nan:0x7fe00000) (INVALID)
to int32: -2147483648 (INVALID)
to int64: -9223372036854775808 (INVALID)
to uint32: 0 (INVALID)
to uint64: 0 (INVALID)
The explanation seems to be a behavior change when compiling to different
versions of power hardware. When building the arguments from the multiarch
directory, let's ensure these float tests offer a deterministic response
to these NaN tests by explicitly binding them to a CPU architecture.
Chose power8 for no real reason. This behavior change appears between
power6 and power7, but other tests that rely on a specific architecture
today pick either power8 or power10.
Signed-off-by: Eric Farman <farman@linux.ibm.com>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>
Link: https://lore.kernel.org/qemu-devel/20261019185600.2031729-3-farman@linux.ibm.com
Signed-off-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>
diff --git a/tests/tcg/ppc64/float_convd.ref b/tests/tcg/ppc64/float_convd.ref
index 43aa3117f1..2995a767c0 100644
--- a/tests/tcg/ppc64/float_convd.ref
+++ b/tests/tcg/ppc64/float_convd.ref
@@ -4,61 +4,61 @@ from double: f64(nan:0x007ff4000000000000)
to int32: -2147483648 (INVALID)
to int64: -9223372036854775808 (INVALID)
to uint32: 0 (INVALID)
- to uint64: -9223372036854775808 (INVALID)
+ to uint64: 0 (INVALID)
from double: f64(-nan:0x00fff8000000000000)
to single: f32(-nan:0xffc00000) (OK)
to int32: -2147483648 (INVALID)
to int64: -9223372036854775808 (INVALID)
to uint32: 0 (INVALID)
- to uint64: -9223372036854775808 (INVALID)
+ to uint64: 0 (INVALID)
from double: f64(-inf:0x00fff0000000000000)
to single: f32(-inf:0xff800000) (OK)
to int32: -2147483648 (INVALID)
to int64: -9223372036854775808 (INVALID)
to uint32: 0 (INVALID)
- to uint64: -9223372036854775808 (INVALID)
+ to uint64: 0 (INVALID)
from double: f64(-0x1.fffffffffffff0000000p+1023:0x00ffefffffffffffff)
to single: f32(-inf:0xff800000) (OVERFLOW INEXACT )
to int32: -2147483648 (INVALID)
to int64: -9223372036854775808 (INVALID)
to uint32: 0 (INVALID)
- to uint64: -9223372036854775808 (INVALID)
+ to uint64: 0 (INVALID)
from double: f64(-0x1.fffffe00000000000000p+127:0x00c7efffffe0000000)
to single: f32(-0x1.fffffe00000000000000p+127:0xff7fffff) (OK)
to int32: -2147483648 (INVALID)
to int64: -9223372036854775808 (INVALID)
to uint32: 0 (INVALID)
- to uint64: -9223372036854775808 (INVALID)
+ to uint64: 0 (INVALID)
from double: f64(-0x1.fffffe00000000000000p+127:0x00c7efffffe0000000)
to single: f32(-0x1.fffffe00000000000000p+127:0xff7fffff) (OK)
to int32: -2147483648 (INVALID)
to int64: -9223372036854775808 (INVALID)
to uint32: 0 (INVALID)
- to uint64: -9223372036854775808 (INVALID)
+ to uint64: 0 (INVALID)
from double: f64(-0x1.1874b135ff6540000000p+103:0x00c661874b135ff654)
to single: f32(-0x1.1874b200000000000000p+103:0xf30c3a59) (INEXACT )
to int32: -2147483648 (INVALID)
to int64: -9223372036854775808 (INVALID)
to uint32: 0 (INVALID)
- to uint64: -9223372036854775808 (INVALID)
+ to uint64: 0 (INVALID)
from double: f64(-0x1.c0bab523323b90000000p+99:0x00c62c0bab523323b9)
to single: f32(-0x1.c0bab600000000000000p+99:0xf1605d5b) (INEXACT )
to int32: -2147483648 (INVALID)
to int64: -9223372036854775808 (INVALID)
to uint32: 0 (INVALID)
- to uint64: -9223372036854775808 (INVALID)
+ to uint64: 0 (INVALID)
from double: f64(-0x1.00000000000000000000p+1:0x00c000000000000000)
to single: f32(-0x1.00000000000000000000p+1:0xc0000000) (OK)
to int32: -2 (OK)
to int64: -2 (OK)
- to uint32: -2 (OK)
- to uint64: -2 (OK)
+ to uint32: 0 (INVALID)
+ to uint64: 0 (INVALID)
from double: f64(-0x1.00000000000000000000p+0:0x00bff0000000000000)
to single: f32(-0x1.00000000000000000000p+0:0xbf800000) (OK)
to int32: -1 (OK)
to int64: -1 (OK)
- to uint32: -1 (OK)
- to uint64: -1 (OK)
+ to uint32: 0 (INVALID)
+ to uint64: 0 (INVALID)
from double: f64(-0x1.00000000000000000000p-1022:0x008010000000000000)
to single: f32(-0x0.00000000000000000000p+0:0x80000000) (UNDERFLOW INEXACT )
to int32: 0 (INEXACT )
@@ -208,19 +208,19 @@ from double: f64(0x1.fffffe00000000000000p+127:0x0047efffffe0000000)
to int32: 2147483647 (INVALID)
to int64: 9223372036854775807 (INVALID)
to uint32: -1 (INVALID)
- to uint64: -1 (INEXACT INVALID)
+ to uint64: -1 (INVALID)
from double: f64(0x1.fffffe00000000000000p+127:0x0047efffffe0000000)
to single: f32(0x1.fffffe00000000000000p+127:0x7f7fffff) (OK)
to int32: 2147483647 (INVALID)
to int64: 9223372036854775807 (INVALID)
to uint32: -1 (INVALID)
- to uint64: -1 (INEXACT INVALID)
+ to uint64: -1 (INVALID)
from double: f64(0x1.fffffffffffff0000000p+1023:0x007fefffffffffffff)
to single: f32(inf:0x7f800000) (OVERFLOW INEXACT )
to int32: 2147483647 (INVALID)
to int64: 9223372036854775807 (INVALID)
to uint32: -1 (INVALID)
- to uint64: -1 (INEXACT INVALID)
+ to uint64: -1 (INVALID)
from double: f64(inf:0x007ff0000000000000)
to single: f32(inf:0x7f800000) (OK)
to int32: 2147483647 (INVALID)
@@ -232,80 +232,80 @@ from double: f64(nan:0x007ff8000000000000)
to int32: -2147483648 (INVALID)
to int64: -9223372036854775808 (INVALID)
to uint32: 0 (INVALID)
- to uint64: -9223372036854775808 (INVALID)
+ to uint64: 0 (INVALID)
from double: f64(nan:0x007ff0000000000001)
to single: f32(nan:0x7fc00000) (INVALID)
to int32: -2147483648 (INVALID)
to int64: -9223372036854775808 (INVALID)
to uint32: 0 (INVALID)
- to uint64: -9223372036854775808 (INVALID)
+ to uint64: 0 (INVALID)
from double: f64(nan:0x007ff4000000000000)
to single: f32(nan:0x7fe00000) (INVALID)
to int32: -2147483648 (INVALID)
to int64: -9223372036854775808 (INVALID)
to uint32: 0 (INVALID)
- to uint64: -9223372036854775808 (INVALID)
+ to uint64: 0 (INVALID)
### Rounding upwards
from double: f64(nan:0x007ff4000000000000)
to single: f32(nan:0x7fe00000) (INVALID)
to int32: -2147483648 (INVALID)
to int64: -9223372036854775808 (INVALID)
to uint32: 0 (INVALID)
- to uint64: -9223372036854775808 (INVALID)
+ to uint64: 0 (INVALID)
from double: f64(-nan:0x00fff8000000000000)
to single: f32(-nan:0xffc00000) (OK)
to int32: -2147483648 (INVALID)
to int64: -9223372036854775808 (INVALID)
to uint32: 0 (INVALID)
- to uint64: -9223372036854775808 (INVALID)
+ to uint64: 0 (INVALID)
from double: f64(-inf:0x00fff0000000000000)
to single: f32(-inf:0xff800000) (OK)
to int32: -2147483648 (INVALID)
to int64: -9223372036854775808 (INVALID)
to uint32: 0 (INVALID)
- to uint64: -9223372036854775808 (INVALID)
+ to uint64: 0 (INVALID)
from double: f64(-0x1.fffffffffffff0000000p+1023:0x00ffefffffffffffff)
to single: f32(-0x1.fffffe00000000000000p+127:0xff7fffff) (OVERFLOW INEXACT )
to int32: -2147483648 (INVALID)
to int64: -9223372036854775808 (INVALID)
to uint32: 0 (INVALID)
- to uint64: -9223372036854775808 (INVALID)
+ to uint64: 0 (INVALID)
from double: f64(-0x1.fffffe00000000000000p+127:0x00c7efffffe0000000)
to single: f32(-0x1.fffffe00000000000000p+127:0xff7fffff) (OK)
to int32: -2147483648 (INVALID)
to int64: -9223372036854775808 (INVALID)
to uint32: 0 (INVALID)
- to uint64: -9223372036854775808 (INVALID)
+ to uint64: 0 (INVALID)
from double: f64(-0x1.fffffe00000000000000p+127:0x00c7efffffe0000000)
to single: f32(-0x1.fffffe00000000000000p+127:0xff7fffff) (OK)
to int32: -2147483648 (INVALID)
to int64: -9223372036854775808 (INVALID)
to uint32: 0 (INVALID)
- to uint64: -9223372036854775808 (INVALID)
+ to uint64: 0 (INVALID)
from double: f64(-0x1.1874b135ff6540000000p+103:0x00c661874b135ff654)
to single: f32(-0x1.1874b000000000000000p+103:0xf30c3a58) (INEXACT )
to int32: -2147483648 (INVALID)
to int64: -9223372036854775808 (INVALID)
to uint32: 0 (INVALID)
- to uint64: -9223372036854775808 (INVALID)
+ to uint64: 0 (INVALID)
from double: f64(-0x1.c0bab523323b90000000p+99:0x00c62c0bab523323b9)
to single: f32(-0x1.c0bab400000000000000p+99:0xf1605d5a) (INEXACT )
to int32: -2147483648 (INVALID)
to int64: -9223372036854775808 (INVALID)
to uint32: 0 (INVALID)
- to uint64: -9223372036854775808 (INVALID)
+ to uint64: 0 (INVALID)
from double: f64(-0x1.00000000000000000000p+1:0x00c000000000000000)
to single: f32(-0x1.00000000000000000000p+1:0xc0000000) (OK)
to int32: -2 (OK)
to int64: -2 (OK)
- to uint32: -2 (OK)
- to uint64: -2 (OK)
+ to uint32: 0 (INVALID)
+ to uint64: 0 (INVALID)
from double: f64(-0x1.00000000000000000000p+0:0x00bff0000000000000)
to single: f32(-0x1.00000000000000000000p+0:0xbf800000) (OK)
to int32: -1 (OK)
to int64: -1 (OK)
- to uint32: -1 (OK)
- to uint64: -1 (OK)
+ to uint32: 0 (INVALID)
+ to uint64: 0 (INVALID)
from double: f64(-0x1.00000000000000000000p-1022:0x008010000000000000)
to single: f32(-0x0.00000000000000000000p+0:0x80000000) (UNDERFLOW INEXACT )
to int32: 0 (INEXACT )
@@ -455,19 +455,19 @@ from double: f64(0x1.fffffe00000000000000p+127:0x0047efffffe0000000)
to int32: 2147483647 (INVALID)
to int64: 9223372036854775807 (INVALID)
to uint32: -1 (INVALID)
- to uint64: -1 (INEXACT INVALID)
+ to uint64: -1 (INVALID)
from double: f64(0x1.fffffe00000000000000p+127:0x0047efffffe0000000)
to single: f32(0x1.fffffe00000000000000p+127:0x7f7fffff) (OK)
to int32: 2147483647 (INVALID)
to int64: 9223372036854775807 (INVALID)
to uint32: -1 (INVALID)
- to uint64: -1 (INEXACT INVALID)
+ to uint64: -1 (INVALID)
from double: f64(0x1.fffffffffffff0000000p+1023:0x007fefffffffffffff)
to single: f32(inf:0x7f800000) (OVERFLOW INEXACT )
to int32: 2147483647 (INVALID)
to int64: 9223372036854775807 (INVALID)
to uint32: -1 (INVALID)
- to uint64: -1 (INEXACT INVALID)
+ to uint64: -1 (INVALID)
from double: f64(inf:0x007ff0000000000000)
to single: f32(inf:0x7f800000) (OK)
to int32: 2147483647 (INVALID)
@@ -479,80 +479,80 @@ from double: f64(nan:0x007ff8000000000000)
to int32: -2147483648 (INVALID)
to int64: -9223372036854775808 (INVALID)
to uint32: 0 (INVALID)
- to uint64: -9223372036854775808 (INVALID)
+ to uint64: 0 (INVALID)
from double: f64(nan:0x007ff0000000000001)
to single: f32(nan:0x7fc00000) (INVALID)
to int32: -2147483648 (INVALID)
to int64: -9223372036854775808 (INVALID)
to uint32: 0 (INVALID)
- to uint64: -9223372036854775808 (INVALID)
+ to uint64: 0 (INVALID)
from double: f64(nan:0x007ff4000000000000)
to single: f32(nan:0x7fe00000) (INVALID)
to int32: -2147483648 (INVALID)
to int64: -9223372036854775808 (INVALID)
to uint32: 0 (INVALID)
- to uint64: -9223372036854775808 (INVALID)
+ to uint64: 0 (INVALID)
### Rounding downwards
from double: f64(nan:0x007ff4000000000000)
to single: f32(nan:0x7fe00000) (INVALID)
to int32: -2147483648 (INVALID)
to int64: -9223372036854775808 (INVALID)
to uint32: 0 (INVALID)
- to uint64: -9223372036854775808 (INVALID)
+ to uint64: 0 (INVALID)
from double: f64(-nan:0x00fff8000000000000)
to single: f32(-nan:0xffc00000) (OK)
to int32: -2147483648 (INVALID)
to int64: -9223372036854775808 (INVALID)
to uint32: 0 (INVALID)
- to uint64: -9223372036854775808 (INVALID)
+ to uint64: 0 (INVALID)
from double: f64(-inf:0x00fff0000000000000)
to single: f32(-inf:0xff800000) (OK)
to int32: -2147483648 (INVALID)
to int64: -9223372036854775808 (INVALID)
to uint32: 0 (INVALID)
- to uint64: -9223372036854775808 (INVALID)
+ to uint64: 0 (INVALID)
from double: f64(-0x1.fffffffffffff0000000p+1023:0x00ffefffffffffffff)
to single: f32(-inf:0xff800000) (OVERFLOW INEXACT )
to int32: -2147483648 (INVALID)
to int64: -9223372036854775808 (INVALID)
to uint32: 0 (INVALID)
- to uint64: -9223372036854775808 (INVALID)
+ to uint64: 0 (INVALID)
from double: f64(-0x1.fffffe00000000000000p+127:0x00c7efffffe0000000)
to single: f32(-0x1.fffffe00000000000000p+127:0xff7fffff) (OK)
to int32: -2147483648 (INVALID)
to int64: -9223372036854775808 (INVALID)
to uint32: 0 (INVALID)
- to uint64: -9223372036854775808 (INVALID)
+ to uint64: 0 (INVALID)
from double: f64(-0x1.fffffe00000000000000p+127:0x00c7efffffe0000000)
to single: f32(-0x1.fffffe00000000000000p+127:0xff7fffff) (OK)
to int32: -2147483648 (INVALID)
to int64: -9223372036854775808 (INVALID)
to uint32: 0 (INVALID)
- to uint64: -9223372036854775808 (INVALID)
+ to uint64: 0 (INVALID)
from double: f64(-0x1.1874b135ff6540000000p+103:0x00c661874b135ff654)
to single: f32(-0x1.1874b200000000000000p+103:0xf30c3a59) (INEXACT )
to int32: -2147483648 (INVALID)
to int64: -9223372036854775808 (INVALID)
to uint32: 0 (INVALID)
- to uint64: -9223372036854775808 (INVALID)
+ to uint64: 0 (INVALID)
from double: f64(-0x1.c0bab523323b90000000p+99:0x00c62c0bab523323b9)
to single: f32(-0x1.c0bab600000000000000p+99:0xf1605d5b) (INEXACT )
to int32: -2147483648 (INVALID)
to int64: -9223372036854775808 (INVALID)
to uint32: 0 (INVALID)
- to uint64: -9223372036854775808 (INVALID)
+ to uint64: 0 (INVALID)
from double: f64(-0x1.00000000000000000000p+1:0x00c000000000000000)
to single: f32(-0x1.00000000000000000000p+1:0xc0000000) (OK)
to int32: -2 (OK)
to int64: -2 (OK)
- to uint32: -2 (OK)
- to uint64: -2 (OK)
+ to uint32: 0 (INVALID)
+ to uint64: 0 (INVALID)
from double: f64(-0x1.00000000000000000000p+0:0x00bff0000000000000)
to single: f32(-0x1.00000000000000000000p+0:0xbf800000) (OK)
to int32: -1 (OK)
to int64: -1 (OK)
- to uint32: -1 (OK)
- to uint64: -1 (OK)
+ to uint32: 0 (INVALID)
+ to uint64: 0 (INVALID)
from double: f64(-0x1.00000000000000000000p-1022:0x008010000000000000)
to single: f32(-0x1.00000000000000000000p-149:0x80000001) (UNDERFLOW INEXACT )
to int32: 0 (INEXACT )
@@ -702,19 +702,19 @@ from double: f64(0x1.fffffe00000000000000p+127:0x0047efffffe0000000)
to int32: 2147483647 (INVALID)
to int64: 9223372036854775807 (INVALID)
to uint32: -1 (INVALID)
- to uint64: -1 (INEXACT INVALID)
+ to uint64: -1 (INVALID)
from double: f64(0x1.fffffe00000000000000p+127:0x0047efffffe0000000)
to single: f32(0x1.fffffe00000000000000p+127:0x7f7fffff) (OK)
to int32: 2147483647 (INVALID)
to int64: 9223372036854775807 (INVALID)
to uint32: -1 (INVALID)
- to uint64: -1 (INEXACT INVALID)
+ to uint64: -1 (INVALID)
from double: f64(0x1.fffffffffffff0000000p+1023:0x007fefffffffffffff)
to single: f32(0x1.fffffe00000000000000p+127:0x7f7fffff) (OVERFLOW INEXACT )
to int32: 2147483647 (INVALID)
to int64: 9223372036854775807 (INVALID)
to uint32: -1 (INVALID)
- to uint64: -1 (INEXACT INVALID)
+ to uint64: -1 (INVALID)
from double: f64(inf:0x007ff0000000000000)
to single: f32(inf:0x7f800000) (OK)
to int32: 2147483647 (INVALID)
@@ -726,80 +726,80 @@ from double: f64(nan:0x007ff8000000000000)
to int32: -2147483648 (INVALID)
to int64: -9223372036854775808 (INVALID)
to uint32: 0 (INVALID)
- to uint64: -9223372036854775808 (INVALID)
+ to uint64: 0 (INVALID)
from double: f64(nan:0x007ff0000000000001)
to single: f32(nan:0x7fc00000) (INVALID)
to int32: -2147483648 (INVALID)
to int64: -9223372036854775808 (INVALID)
to uint32: 0 (INVALID)
- to uint64: -9223372036854775808 (INVALID)
+ to uint64: 0 (INVALID)
from double: f64(nan:0x007ff4000000000000)
to single: f32(nan:0x7fe00000) (INVALID)
to int32: -2147483648 (INVALID)
to int64: -9223372036854775808 (INVALID)
to uint32: 0 (INVALID)
- to uint64: -9223372036854775808 (INVALID)
+ to uint64: 0 (INVALID)
### Rounding to zero
from double: f64(nan:0x007ff4000000000000)
to single: f32(nan:0x7fe00000) (INVALID)
to int32: -2147483648 (INVALID)
to int64: -9223372036854775808 (INVALID)
to uint32: 0 (INVALID)
- to uint64: -9223372036854775808 (INVALID)
+ to uint64: 0 (INVALID)
from double: f64(-nan:0x00fff8000000000000)
to single: f32(-nan:0xffc00000) (OK)
to int32: -2147483648 (INVALID)
to int64: -9223372036854775808 (INVALID)
to uint32: 0 (INVALID)
- to uint64: -9223372036854775808 (INVALID)
+ to uint64: 0 (INVALID)
from double: f64(-inf:0x00fff0000000000000)
to single: f32(-inf:0xff800000) (OK)
to int32: -2147483648 (INVALID)
to int64: -9223372036854775808 (INVALID)
to uint32: 0 (INVALID)
- to uint64: -9223372036854775808 (INVALID)
+ to uint64: 0 (INVALID)
from double: f64(-0x1.fffffffffffff0000000p+1023:0x00ffefffffffffffff)
to single: f32(-0x1.fffffe00000000000000p+127:0xff7fffff) (OVERFLOW INEXACT )
to int32: -2147483648 (INVALID)
to int64: -9223372036854775808 (INVALID)
to uint32: 0 (INVALID)
- to uint64: -9223372036854775808 (INVALID)
+ to uint64: 0 (INVALID)
from double: f64(-0x1.fffffe00000000000000p+127:0x00c7efffffe0000000)
to single: f32(-0x1.fffffe00000000000000p+127:0xff7fffff) (OK)
to int32: -2147483648 (INVALID)
to int64: -9223372036854775808 (INVALID)
to uint32: 0 (INVALID)
- to uint64: -9223372036854775808 (INVALID)
+ to uint64: 0 (INVALID)
from double: f64(-0x1.fffffe00000000000000p+127:0x00c7efffffe0000000)
to single: f32(-0x1.fffffe00000000000000p+127:0xff7fffff) (OK)
to int32: -2147483648 (INVALID)
to int64: -9223372036854775808 (INVALID)
to uint32: 0 (INVALID)
- to uint64: -9223372036854775808 (INVALID)
+ to uint64: 0 (INVALID)
from double: f64(-0x1.1874b135ff6540000000p+103:0x00c661874b135ff654)
to single: f32(-0x1.1874b000000000000000p+103:0xf30c3a58) (INEXACT )
to int32: -2147483648 (INVALID)
to int64: -9223372036854775808 (INVALID)
to uint32: 0 (INVALID)
- to uint64: -9223372036854775808 (INVALID)
+ to uint64: 0 (INVALID)
from double: f64(-0x1.c0bab523323b90000000p+99:0x00c62c0bab523323b9)
to single: f32(-0x1.c0bab400000000000000p+99:0xf1605d5a) (INEXACT )
to int32: -2147483648 (INVALID)
to int64: -9223372036854775808 (INVALID)
to uint32: 0 (INVALID)
- to uint64: -9223372036854775808 (INVALID)
+ to uint64: 0 (INVALID)
from double: f64(-0x1.00000000000000000000p+1:0x00c000000000000000)
to single: f32(-0x1.00000000000000000000p+1:0xc0000000) (OK)
to int32: -2 (OK)
to int64: -2 (OK)
- to uint32: -2 (OK)
- to uint64: -2 (OK)
+ to uint32: 0 (INVALID)
+ to uint64: 0 (INVALID)
from double: f64(-0x1.00000000000000000000p+0:0x00bff0000000000000)
to single: f32(-0x1.00000000000000000000p+0:0xbf800000) (OK)
to int32: -1 (OK)
to int64: -1 (OK)
- to uint32: -1 (OK)
- to uint64: -1 (OK)
+ to uint32: 0 (INVALID)
+ to uint64: 0 (INVALID)
from double: f64(-0x1.00000000000000000000p-1022:0x008010000000000000)
to single: f32(-0x0.00000000000000000000p+0:0x80000000) (UNDERFLOW INEXACT )
to int32: 0 (INEXACT )
@@ -949,19 +949,19 @@ from double: f64(0x1.fffffe00000000000000p+127:0x0047efffffe0000000)
to int32: 2147483647 (INVALID)
to int64: 9223372036854775807 (INVALID)
to uint32: -1 (INVALID)
- to uint64: -1 (INEXACT INVALID)
+ to uint64: -1 (INVALID)
from double: f64(0x1.fffffe00000000000000p+127:0x0047efffffe0000000)
to single: f32(0x1.fffffe00000000000000p+127:0x7f7fffff) (OK)
to int32: 2147483647 (INVALID)
to int64: 9223372036854775807 (INVALID)
to uint32: -1 (INVALID)
- to uint64: -1 (INEXACT INVALID)
+ to uint64: -1 (INVALID)
from double: f64(0x1.fffffffffffff0000000p+1023:0x007fefffffffffffff)
to single: f32(0x1.fffffe00000000000000p+127:0x7f7fffff) (OVERFLOW INEXACT )
to int32: 2147483647 (INVALID)
to int64: 9223372036854775807 (INVALID)
to uint32: -1 (INVALID)
- to uint64: -1 (INEXACT INVALID)
+ to uint64: -1 (INVALID)
from double: f64(inf:0x007ff0000000000000)
to single: f32(inf:0x7f800000) (OK)
to int32: 2147483647 (INVALID)
@@ -973,16 +973,16 @@ from double: f64(nan:0x007ff8000000000000)
to int32: -2147483648 (INVALID)
to int64: -9223372036854775808 (INVALID)
to uint32: 0 (INVALID)
- to uint64: -9223372036854775808 (INVALID)
+ to uint64: 0 (INVALID)
from double: f64(nan:0x007ff0000000000001)
to single: f32(nan:0x7fc00000) (INVALID)
to int32: -2147483648 (INVALID)
to int64: -9223372036854775808 (INVALID)
to uint32: 0 (INVALID)
- to uint64: -9223372036854775808 (INVALID)
+ to uint64: 0 (INVALID)
from double: f64(nan:0x007ff4000000000000)
to single: f32(nan:0x7fe00000) (INVALID)
to int32: -2147483648 (INVALID)
to int64: -9223372036854775808 (INVALID)
to uint32: 0 (INVALID)
- to uint64: -9223372036854775808 (INVALID)
+ to uint64: 0 (INVALID)
diff --git a/tests/tcg/ppc64/float_convs.ref b/tests/tcg/ppc64/float_convs.ref
index bd7b14d37e..6e6f636834 100644
--- a/tests/tcg/ppc64/float_convs.ref
+++ b/tests/tcg/ppc64/float_convs.ref
@@ -4,37 +4,37 @@ from single: f32(-nan:0xffa00000)
to int32: -2147483648 (INVALID)
to int64: -9223372036854775808 (INVALID)
to uint32: 0 (INVALID)
- to uint64: -9223372036854775808 (INVALID)
+ to uint64: 0 (INVALID)
from single: f32(-nan:0xffc00000)
to double: f64(-nan:0x00fff8000000000000) (OK)
to int32: -2147483648 (INVALID)
to int64: -9223372036854775808 (INVALID)
to uint32: 0 (INVALID)
- to uint64: -9223372036854775808 (INVALID)
+ to uint64: 0 (INVALID)
from single: f32(-inf:0xff800000)
to double: f64(-inf:0x00fff0000000000000) (OK)
to int32: -2147483648 (INVALID)
to int64: -9223372036854775808 (INVALID)
to uint32: 0 (INVALID)
- to uint64: -9223372036854775808 (INVALID)
+ to uint64: 0 (INVALID)
from single: f32(-0x1.fffffe00000000000000p+127:0xff7fffff)
to double: f64(-0x1.fffffe00000000000000p+127:0x00c7efffffe0000000) (OK)
to int32: -2147483648 (INVALID)
to int64: -9223372036854775808 (INVALID)
to uint32: 0 (INVALID)
- to uint64: -9223372036854775808 (INVALID)
+ to uint64: 0 (INVALID)
from single: f32(-0x1.1874b200000000000000p+103:0xf30c3a59)
to double: f64(-0x1.1874b200000000000000p+103:0x00c661874b20000000) (OK)
to int32: -2147483648 (INVALID)
to int64: -9223372036854775808 (INVALID)
to uint32: 0 (INVALID)
- to uint64: -9223372036854775808 (INVALID)
+ to uint64: 0 (INVALID)
from single: f32(-0x1.c0bab600000000000000p+99:0xf1605d5b)
to double: f64(-0x1.c0bab600000000000000p+99:0x00c62c0bab60000000) (OK)
to int32: -2147483648 (INVALID)
to int64: -9223372036854775808 (INVALID)
to uint32: 0 (INVALID)
- to uint64: -9223372036854775808 (INVALID)
+ to uint64: 0 (INVALID)
from single: f32(-0x1.31f75000000000000000p-40:0xab98fba8)
to double: f64(-0x1.31f75000000000000000p-40:0x00bd731f7500000000) (OK)
to int32: 0 (INEXACT )
@@ -160,13 +160,13 @@ from single: f32(0x1.c0bab600000000000000p+99:0x71605d5b)
to int32: 2147483647 (INVALID)
to int64: 9223372036854775807 (INVALID)
to uint32: -1 (INVALID)
- to uint64: -1 (INEXACT INVALID)
+ to uint64: -1 (INVALID)
from single: f32(0x1.fffffe00000000000000p+127:0x7f7fffff)
to double: f64(0x1.fffffe00000000000000p+127:0x0047efffffe0000000) (OK)
to int32: 2147483647 (INVALID)
to int64: 9223372036854775807 (INVALID)
to uint32: -1 (INVALID)
- to uint64: -1 (INEXACT INVALID)
+ to uint64: -1 (INVALID)
from single: f32(inf:0x7f800000)
to double: f64(inf:0x007ff0000000000000) (OK)
to int32: 2147483647 (INVALID)
@@ -178,50 +178,50 @@ from single: f32(nan:0x7fc00000)
to int32: -2147483648 (INVALID)
to int64: -9223372036854775808 (INVALID)
to uint32: 0 (INVALID)
- to uint64: -9223372036854775808 (INVALID)
+ to uint64: 0 (INVALID)
from single: f32(nan:0x7fa00000)
to double: f64(nan:0x007ff4000000000000) (OK)
to int32: -2147483648 (INVALID)
to int64: -9223372036854775808 (INVALID)
to uint32: 0 (INVALID)
- to uint64: -9223372036854775808 (INVALID)
+ to uint64: 0 (INVALID)
### Rounding upwards
from single: f32(-nan:0xffa00000)
to double: f64(-nan:0x00fff4000000000000) (OK)
to int32: -2147483648 (INVALID)
to int64: -9223372036854775808 (INVALID)
to uint32: 0 (INVALID)
- to uint64: -9223372036854775808 (INVALID)
+ to uint64: 0 (INVALID)
from single: f32(-nan:0xffc00000)
to double: f64(-nan:0x00fff8000000000000) (OK)
to int32: -2147483648 (INVALID)
to int64: -9223372036854775808 (INVALID)
to uint32: 0 (INVALID)
- to uint64: -9223372036854775808 (INVALID)
+ to uint64: 0 (INVALID)
from single: f32(-inf:0xff800000)
to double: f64(-inf:0x00fff0000000000000) (OK)
to int32: -2147483648 (INVALID)
to int64: -9223372036854775808 (INVALID)
to uint32: 0 (INVALID)
- to uint64: -9223372036854775808 (INVALID)
+ to uint64: 0 (INVALID)
from single: f32(-0x1.fffffe00000000000000p+127:0xff7fffff)
to double: f64(-0x1.fffffe00000000000000p+127:0x00c7efffffe0000000) (OK)
to int32: -2147483648 (INVALID)
to int64: -9223372036854775808 (INVALID)
to uint32: 0 (INVALID)
- to uint64: -9223372036854775808 (INVALID)
+ to uint64: 0 (INVALID)
from single: f32(-0x1.1874b200000000000000p+103:0xf30c3a59)
to double: f64(-0x1.1874b200000000000000p+103:0x00c661874b20000000) (OK)
to int32: -2147483648 (INVALID)
to int64: -9223372036854775808 (INVALID)
to uint32: 0 (INVALID)
- to uint64: -9223372036854775808 (INVALID)
+ to uint64: 0 (INVALID)
from single: f32(-0x1.c0bab600000000000000p+99:0xf1605d5b)
to double: f64(-0x1.c0bab600000000000000p+99:0x00c62c0bab60000000) (OK)
to int32: -2147483648 (INVALID)
to int64: -9223372036854775808 (INVALID)
to uint32: 0 (INVALID)
- to uint64: -9223372036854775808 (INVALID)
+ to uint64: 0 (INVALID)
from single: f32(-0x1.31f75000000000000000p-40:0xab98fba8)
to double: f64(-0x1.31f75000000000000000p-40:0x00bd731f7500000000) (OK)
to int32: 0 (INEXACT )
@@ -347,13 +347,13 @@ from single: f32(0x1.c0bab600000000000000p+99:0x71605d5b)
to int32: 2147483647 (INVALID)
to int64: 9223372036854775807 (INVALID)
to uint32: -1 (INVALID)
- to uint64: -1 (INEXACT INVALID)
+ to uint64: -1 (INVALID)
from single: f32(0x1.fffffe00000000000000p+127:0x7f7fffff)
to double: f64(0x1.fffffe00000000000000p+127:0x0047efffffe0000000) (OK)
to int32: 2147483647 (INVALID)
to int64: 9223372036854775807 (INVALID)
to uint32: -1 (INVALID)
- to uint64: -1 (INEXACT INVALID)
+ to uint64: -1 (INVALID)
from single: f32(inf:0x7f800000)
to double: f64(inf:0x007ff0000000000000) (OK)
to int32: 2147483647 (INVALID)
@@ -365,50 +365,50 @@ from single: f32(nan:0x7fc00000)
to int32: -2147483648 (INVALID)
to int64: -9223372036854775808 (INVALID)
to uint32: 0 (INVALID)
- to uint64: -9223372036854775808 (INVALID)
+ to uint64: 0 (INVALID)
from single: f32(nan:0x7fa00000)
to double: f64(nan:0x007ff4000000000000) (OK)
to int32: -2147483648 (INVALID)
to int64: -9223372036854775808 (INVALID)
to uint32: 0 (INVALID)
- to uint64: -9223372036854775808 (INVALID)
+ to uint64: 0 (INVALID)
### Rounding downwards
from single: f32(-nan:0xffa00000)
to double: f64(-nan:0x00fff4000000000000) (OK)
to int32: -2147483648 (INVALID)
to int64: -9223372036854775808 (INVALID)
to uint32: 0 (INVALID)
- to uint64: -9223372036854775808 (INVALID)
+ to uint64: 0 (INVALID)
from single: f32(-nan:0xffc00000)
to double: f64(-nan:0x00fff8000000000000) (OK)
to int32: -2147483648 (INVALID)
to int64: -9223372036854775808 (INVALID)
to uint32: 0 (INVALID)
- to uint64: -9223372036854775808 (INVALID)
+ to uint64: 0 (INVALID)
from single: f32(-inf:0xff800000)
to double: f64(-inf:0x00fff0000000000000) (OK)
to int32: -2147483648 (INVALID)
to int64: -9223372036854775808 (INVALID)
to uint32: 0 (INVALID)
- to uint64: -9223372036854775808 (INVALID)
+ to uint64: 0 (INVALID)
from single: f32(-0x1.fffffe00000000000000p+127:0xff7fffff)
to double: f64(-0x1.fffffe00000000000000p+127:0x00c7efffffe0000000) (OK)
to int32: -2147483648 (INVALID)
to int64: -9223372036854775808 (INVALID)
to uint32: 0 (INVALID)
- to uint64: -9223372036854775808 (INVALID)
+ to uint64: 0 (INVALID)
from single: f32(-0x1.1874b200000000000000p+103:0xf30c3a59)
to double: f64(-0x1.1874b200000000000000p+103:0x00c661874b20000000) (OK)
to int32: -2147483648 (INVALID)
to int64: -9223372036854775808 (INVALID)
to uint32: 0 (INVALID)
- to uint64: -9223372036854775808 (INVALID)
+ to uint64: 0 (INVALID)
from single: f32(-0x1.c0bab600000000000000p+99:0xf1605d5b)
to double: f64(-0x1.c0bab600000000000000p+99:0x00c62c0bab60000000) (OK)
to int32: -2147483648 (INVALID)
to int64: -9223372036854775808 (INVALID)
to uint32: 0 (INVALID)
- to uint64: -9223372036854775808 (INVALID)
+ to uint64: 0 (INVALID)
from single: f32(-0x1.31f75000000000000000p-40:0xab98fba8)
to double: f64(-0x1.31f75000000000000000p-40:0x00bd731f7500000000) (OK)
to int32: 0 (INEXACT )
@@ -534,13 +534,13 @@ from single: f32(0x1.c0bab600000000000000p+99:0x71605d5b)
to int32: 2147483647 (INVALID)
to int64: 9223372036854775807 (INVALID)
to uint32: -1 (INVALID)
- to uint64: -1 (INEXACT INVALID)
+ to uint64: -1 (INVALID)
from single: f32(0x1.fffffe00000000000000p+127:0x7f7fffff)
to double: f64(0x1.fffffe00000000000000p+127:0x0047efffffe0000000) (OK)
to int32: 2147483647 (INVALID)
to int64: 9223372036854775807 (INVALID)
to uint32: -1 (INVALID)
- to uint64: -1 (INEXACT INVALID)
+ to uint64: -1 (INVALID)
from single: f32(inf:0x7f800000)
to double: f64(inf:0x007ff0000000000000) (OK)
to int32: 2147483647 (INVALID)
@@ -552,50 +552,50 @@ from single: f32(nan:0x7fc00000)
to int32: -2147483648 (INVALID)
to int64: -9223372036854775808 (INVALID)
to uint32: 0 (INVALID)
- to uint64: -9223372036854775808 (INVALID)
+ to uint64: 0 (INVALID)
from single: f32(nan:0x7fa00000)
to double: f64(nan:0x007ff4000000000000) (OK)
to int32: -2147483648 (INVALID)
to int64: -9223372036854775808 (INVALID)
to uint32: 0 (INVALID)
- to uint64: -9223372036854775808 (INVALID)
+ to uint64: 0 (INVALID)
### Rounding to zero
from single: f32(-nan:0xffa00000)
to double: f64(-nan:0x00fff4000000000000) (OK)
to int32: -2147483648 (INVALID)
to int64: -9223372036854775808 (INVALID)
to uint32: 0 (INVALID)
- to uint64: -9223372036854775808 (INVALID)
+ to uint64: 0 (INVALID)
from single: f32(-nan:0xffc00000)
to double: f64(-nan:0x00fff8000000000000) (OK)
to int32: -2147483648 (INVALID)
to int64: -9223372036854775808 (INVALID)
to uint32: 0 (INVALID)
- to uint64: -9223372036854775808 (INVALID)
+ to uint64: 0 (INVALID)
from single: f32(-inf:0xff800000)
to double: f64(-inf:0x00fff0000000000000) (OK)
to int32: -2147483648 (INVALID)
to int64: -9223372036854775808 (INVALID)
to uint32: 0 (INVALID)
- to uint64: -9223372036854775808 (INVALID)
+ to uint64: 0 (INVALID)
from single: f32(-0x1.fffffe00000000000000p+127:0xff7fffff)
to double: f64(-0x1.fffffe00000000000000p+127:0x00c7efffffe0000000) (OK)
to int32: -2147483648 (INVALID)
to int64: -9223372036854775808 (INVALID)
to uint32: 0 (INVALID)
- to uint64: -9223372036854775808 (INVALID)
+ to uint64: 0 (INVALID)
from single: f32(-0x1.1874b200000000000000p+103:0xf30c3a59)
to double: f64(-0x1.1874b200000000000000p+103:0x00c661874b20000000) (OK)
to int32: -2147483648 (INVALID)
to int64: -9223372036854775808 (INVALID)
to uint32: 0 (INVALID)
- to uint64: -9223372036854775808 (INVALID)
+ to uint64: 0 (INVALID)
from single: f32(-0x1.c0bab600000000000000p+99:0xf1605d5b)
to double: f64(-0x1.c0bab600000000000000p+99:0x00c62c0bab60000000) (OK)
to int32: -2147483648 (INVALID)
to int64: -9223372036854775808 (INVALID)
to uint32: 0 (INVALID)
- to uint64: -9223372036854775808 (INVALID)
+ to uint64: 0 (INVALID)
from single: f32(-0x1.31f75000000000000000p-40:0xab98fba8)
to double: f64(-0x1.31f75000000000000000p-40:0x00bd731f7500000000) (OK)
to int32: 0 (INEXACT )
@@ -721,13 +721,13 @@ from single: f32(0x1.c0bab600000000000000p+99:0x71605d5b)
to int32: 2147483647 (INVALID)
to int64: 9223372036854775807 (INVALID)
to uint32: -1 (INVALID)
- to uint64: -1 (INEXACT INVALID)
+ to uint64: -1 (INVALID)
from single: f32(0x1.fffffe00000000000000p+127:0x7f7fffff)
to double: f64(0x1.fffffe00000000000000p+127:0x0047efffffe0000000) (OK)
to int32: 2147483647 (INVALID)
to int64: 9223372036854775807 (INVALID)
to uint32: -1 (INVALID)
- to uint64: -1 (INEXACT INVALID)
+ to uint64: -1 (INVALID)
from single: f32(inf:0x7f800000)
to double: f64(inf:0x007ff0000000000000) (OK)
to int32: 2147483647 (INVALID)
@@ -739,10 +739,10 @@ from single: f32(nan:0x7fc00000)
to int32: -2147483648 (INVALID)
to int64: -9223372036854775808 (INVALID)
to uint32: 0 (INVALID)
- to uint64: -9223372036854775808 (INVALID)
+ to uint64: 0 (INVALID)
from single: f32(nan:0x7fa00000)
to double: f64(nan:0x007ff4000000000000) (OK)
to int32: -2147483648 (INVALID)
to int64: -9223372036854775808 (INVALID)
to uint32: 0 (INVALID)
- to uint64: -9223372036854775808 (INVALID)
+ to uint64: 0 (INVALID)
diff --git a/tests/tcg/ppc64/meson.build b/tests/tcg/ppc64/meson.build
index 8cca4d65a4..d9b4b153d9 100644
--- a/tests/tcg/ppc64/meson.build
+++ b/tests/tcg/ppc64/meson.build
@@ -13,6 +13,12 @@ foreach t: tcg_tests['multiarch-linux-user']['tests']
if fs.stem(src) == 'test-plugin-mem-access' and 'wrapper' in setup
continue
endif
+ if fs.stem(src).contains('float_conv')
+ # Ensure float NaN tests are done against a known cpu generation
+ if 'cflags' in setup
+ setup += {'cflags': setup['cflags'] + '-mcpu=power8'}
+ endif
+ endif
tests += {src: setup}
endforeach
endforeach