blob: 379d3e1f4f4954b26308e577be276830ad23da8f (
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
|
x86: 0.966
architecture: 0.948
performance: 0.804
device: 0.770
kernel: 0.743
ppc: 0.659
register: 0.630
semantic: 0.629
socket: 0.619
peripherals: 0.587
i386: 0.582
network: 0.548
vnc: 0.529
PID: 0.521
permissions: 0.498
graphic: 0.455
boot: 0.437
mistranslation: 0.417
VMM: 0.414
risc-v: 0.404
user-level: 0.403
hypervisor: 0.395
TCG: 0.382
debug: 0.381
files: 0.344
arm: 0.295
assembly: 0.269
KVM: 0.262
virtual: 0.207
--------------------
x86: 0.965
debug: 0.520
TCG: 0.455
virtual: 0.150
hypervisor: 0.106
kernel: 0.054
PID: 0.038
files: 0.036
register: 0.033
user-level: 0.011
assembly: 0.011
socket: 0.010
performance: 0.007
network: 0.007
boot: 0.005
architecture: 0.004
device: 0.004
semantic: 0.003
vnc: 0.003
risc-v: 0.002
peripherals: 0.002
graphic: 0.002
VMM: 0.001
ppc: 0.001
permissions: 0.001
mistranslation: 0.000
i386: 0.000
arm: 0.000
KVM: 0.000
Wrong implementation of SSE4.1 pmovzxbw and similar instructions
QEMU 1.5.0 (and git version, as far as I can tell from the source code) has incorrect implementation of pmovzxbw and similar SSE4.1 instructions. The instruction zero-extends the first 8 8-bit elements of a vector to 16bit vector and puts them to another vector. The current implementation applies this operation only to the first element and zeros out the rest.
To verify, compile the attached program for SSE4.1 (g++ -msse4.1 cvtint.cc). On real hardware, it produces the following output:
$ ./a.out
1 0 2 0 3 0 4 0 5 0 6 0 7 0 8 0
On QEMU, the output is as follows:
$ ./a.out
1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
QEMU is invoked as:
qemu-system-x86_64 \
-M pc -cpu Haswell,+sse4.1,+avx,+avx2,+fma,enforce -m 512 \
-serial stdio -no-reboot \
-kernel vmlinuz -initrd initrd.img \
-netdev user,id=user.0 -device rtl8139,netdev=user.0 -redir tcp:2222::22 \
-hda ubuntu-amd64.ext3 \
--append "rw console=tty root=/dev/sda"
Looking through old bug tickets... is this still an issue with the latest version of QEMU? Or could we close this ticket nowadays?
[Expired for QEMU because there has been no activity for 60 days.]
|