summary refs log tree commit diff stats
path: root/gitlab/issues_text/target_ppc/host_missing/accel_missing/1941
blob: fdc1588002657765ebe6100e62feed4797af0ead (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
ppc64: VSX vector float to integer conversion instructions do not always return expected results on QEMU 8.0.4 if source vector has NaN values
Description of problem:
The problem is that the VSX xvcvspsxws/xvcvdpsxws/xvcvspsxds/xvcvdpsxds/xvcvspuxws/xvcvdpuxds/xvcvspuxds/xvcvdpuxws instructions incorrectly convert the preceding non-NaN source values to the NaN to integer result instead of the expected non-NaN to integer conversion result with qemu-ppc64le 8.0.4.

Here are the results of the VSX operations whose results differ from the expected results with QEMU 8.0.4 (generated by running the vsx_f2i_nan_test_program_101423 test program with qemu-ppc64le 8.0.4):
```
xvcvspsxds ({1, 2, 3, nan}) = {-9223372036854775808, -9223372036854775808}
xvcvspsxds ({nan, 2, 3, nan}) = {-9223372036854775808, -9223372036854775808}
xvcvspsxds ({1, 2, nan, nan}) = {-9223372036854775808, -9223372036854775808}
xvcvspsxds ({nan, 2, nan, nan}) = {-9223372036854775808, -9223372036854775808}

xvcvspsxws ({1, nan, 3, 4}) = {-2147483648, -2147483648, 3, 4}
xvcvspsxws ({1, 2, nan, 4}) = {-2147483648, -2147483648, -2147483648, 4}
xvcvspsxws ({nan, 2, nan, 4}) = {-2147483648, -2147483648, -2147483648, 4}
xvcvspsxws ({1, nan, nan, 4}) = {-2147483648, -2147483648, -2147483648, 4}
xvcvspsxws ({1, 2, 3, nan}) = {-2147483648, -2147483648, -2147483648, -2147483648}
xvcvspsxws ({nan, 2, 3, nan}) = {-2147483648, -2147483648, -2147483648, -2147483648}
xvcvspsxws ({1, nan, 3, nan}) = {-2147483648, -2147483648, -2147483648, -2147483648}
xvcvspsxws ({nan, nan, 3, nan}) = {-2147483648, -2147483648, -2147483648, -2147483648}
xvcvspsxws ({1, 2, nan, nan}) = {-2147483648, -2147483648, -2147483648, -2147483648}
xvcvspsxws ({nan, 2, nan, nan}) = {-2147483648, -2147483648, -2147483648, -2147483648}
xvcvspsxws ({1, nan, nan, nan}) = {-2147483648, -2147483648, -2147483648, -2147483648}

xvcvspuxds ({1, 2, 3, nan}) = {0, 0}
xvcvspuxds ({nan, 2, 3, nan}) = {0, 0}
xvcvspuxds ({1, 2, nan, nan}) = {0, 0}
xvcvspuxds ({nan, 2, nan, nan}) = {0, 0}

xvcvspuxws ({1, nan, 3, 4}) = {0, 0, 3, 4}
xvcvspuxws ({1, 2, nan, 4}) = {0, 0, 0, 4}
xvcvspuxws ({nan, 2, nan, 4}) = {0, 0, 0, 4}
xvcvspuxws ({1, nan, nan, 4}) = {0, 0, 0, 4}
xvcvspuxws ({1, 2, 3, nan}) = {0, 0, 0, 0}
xvcvspuxws ({nan, 2, 3, nan}) = {0, 0, 0, 0}
xvcvspuxws ({1, nan, 3, nan}) = {0, 0, 0, 0}
xvcvspuxws ({nan, nan, 3, nan}) = {0, 0, 0, 0}
xvcvspuxws ({1, 2, nan, nan}) = {0, 0, 0, 0}
xvcvspuxws ({nan, 2, nan, nan}) = {0, 0, 0, 0}
xvcvspuxws ({1, nan, nan, nan}) = {0, 0, 0, 0}

xvcvdpsxws ({1, nan}) = {-2147483648, -2147483648, -2147483648, -2147483648}

xvcvdpuxws ({1, nan}) = {0, 0, 0, 0}

xvcvdpsxds ({1, nan}) = {-9223372036854775808, -9223372036854775808}

xvcvdpuxds ({1, nan}) = {0, 0}
```

Here are the results of the same VSX conversion operations with QEMU 6.2.0 (generated by running the vsx_f2i_nan_test_program_101423 test program with qemu-ppc64le 6.2.0):
```
xvcvspsxds ({1, 2, 3, nan}) = {2, -9223372036854775808}
xvcvspsxds ({nan, 2, 3, nan}) = {2, -9223372036854775808}
xvcvspsxds ({1, 2, nan, nan}) = {2, -9223372036854775808}
xvcvspsxds ({nan, 2, nan, nan}) = {2, -9223372036854775808}

xvcvspsxws ({1, nan, 3, 4}) = {1, -2147483648, 3, 4}
xvcvspsxws ({1, 2, nan, 4}) = {1, 2, -2147483648, 4}
xvcvspsxws ({nan, 2, nan, 4}) = {-2147483648, 2, -2147483648, 4}
xvcvspsxws ({1, nan, nan, 4}) = {1, -2147483648, -2147483648, 4}
xvcvspsxws ({1, 2, 3, nan}) = {1, 2, 3, -2147483648}
xvcvspsxws ({nan, 2, 3, nan}) = {-2147483648, 2, 3, -2147483648}
xvcvspsxws ({1, nan, 3, nan}) = {1, -2147483648, 3, -2147483648}
xvcvspsxws ({nan, nan, 3, nan}) = {-2147483648, -2147483648, 3, -2147483648}
xvcvspsxws ({1, 2, nan, nan}) = {1, 2, -2147483648, -2147483648}
xvcvspsxws ({nan, 2, nan, nan}) = {-2147483648, 2, -2147483648, -2147483648}
xvcvspsxws ({1, nan, nan, nan}) = {1, -2147483648, -2147483648, -2147483648}

xvcvspuxds ({1, 2, 3, nan}) = {2, 0}
xvcvspuxds ({nan, 2, 3, nan}) = {2, 0}
xvcvspuxds ({1, 2, nan, nan}) = {2, 0}
xvcvspuxds ({nan, 2, nan, nan}) = {2, 0}

xvcvspuxws ({1, nan, 3, 4}) = {1, 0, 3, 4}
xvcvspuxws ({1, 2, nan, 4}) = {1, 2, 0, 4}
xvcvspuxws ({nan, 2, nan, 4}) = {0, 2, 0, 4}
xvcvspuxws ({1, nan, nan, 4}) = {1, 0, 0, 4}
xvcvspuxws ({1, 2, 3, nan}) = {1, 2, 3, 0}
xvcvspuxws ({nan, 2, 3, nan}) = {0, 2, 3, 0}
xvcvspuxws ({1, nan, 3, nan}) = {1, 0, 3, 0}
xvcvspuxws ({nan, nan, 3, nan}) = {0, 0, 3, 0}
xvcvspuxws ({1, 2, nan, nan}) = {1, 2, 0, 0}
xvcvspuxws ({nan, 2, nan, nan}) = {0, 2, 0, 0}
xvcvspuxws ({1, nan, nan, nan}) = {1, 0, 0, 0}

xvcvdpsxws ({1, nan}) = {0, 1, 0, -2147483648}

xvcvdpuxws ({1, nan}) = {0, 1, 0, 0}

xvcvdpsxds ({1, nan}) = {1, -9223372036854775808}

xvcvdpuxds ({1, nan}) = {1, 0}
```
Steps to reproduce:
1. Compile the attached vsx_f2i_nan_test_program_101423.cpp with either `powerpc64le-linux-gnu-g++` or `clang --target=powerpc64le-linux-gnu`
2. Run the compiled vsx_f2i_nan_test_program_101423.cpp program using qemu-ppc64le
3. The vsx_f2i_nan_test_program_101423 program will return the results of the xvcvspsxws, xvcvdpsxws, xvcvspsxds, xvcvdpsxds, xvcvspuxws, xvcvdpuxds, xvcvspuxds, or xvcvdpuxws instruction.
Additional information:
Attachments:
- [vsx_f2i_nan_test_program_101423.cpp](/uploads/749395aee2da1dcc86790804106d30ea/vsx_f2i_nan_test_program_101423.cpp)
- [vsx_f2i_nan_test_program_101423_qemu_6.2.0_output.txt](/uploads/c883c4d04730a9c5a7e301e5d487ae2b/vsx_f2i_nan_test_program_101423_qemu_6.2.0_output.txt) - output of running vsx_f2i_nan_test_program_101423 with QEMU 6.2.0
- [vsx_f2i_nan_test_program_101423_qemu_8.0.4_output.txt](/uploads/9451e3419f8a4f3ef2274b2ccc7ef22d/vsx_f2i_nan_test_program_101423_qemu_8.0.4_output.txt) - output of running vsx_f2i_nan_test_program_101423 with QEMU 8.0.4