summary refs log tree commit diff stats
path: root/results/classifier/118/architecture-x86/1605123
blob: 3be8e6edab64cde964d945d5a96dea5b106a5366 (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
x86: 0.966
architecture: 0.952
graphic: 0.887
ppc: 0.877
performance: 0.804
semantic: 0.794
i386: 0.779
device: 0.717
files: 0.654
mistranslation: 0.618
network: 0.597
user-level: 0.584
permissions: 0.553
vnc: 0.552
arm: 0.546
PID: 0.531
TCG: 0.528
peripherals: 0.516
risc-v: 0.488
boot: 0.485
socket: 0.475
hypervisor: 0.460
kernel: 0.458
register: 0.457
VMM: 0.440
virtual: 0.428
debug: 0.390
KVM: 0.329
assembly: 0.215
--------------------
x86: 0.979
kernel: 0.837
debug: 0.470
user-level: 0.352
virtual: 0.103
hypervisor: 0.089
files: 0.084
register: 0.017
TCG: 0.014
i386: 0.012
semantic: 0.005
PID: 0.005
assembly: 0.004
network: 0.003
device: 0.002
performance: 0.002
architecture: 0.002
KVM: 0.001
VMM: 0.001
socket: 0.001
graphic: 0.001
boot: 0.001
ppc: 0.001
peripherals: 0.001
risc-v: 0.001
vnc: 0.000
permissions: 0.000
mistranslation: 0.000
arm: 0.000

PEXT returns wrong values, seemingly switches arguments

Hi,

I fiddled with BMI2 instructions and discovered that pext instructions
emulated with "qemu-x86_64 -cpu Haswell" return the wrong value. It
seemingly switches up its arguments. I suspect that the error is around the
gen_helper_pext(...) call in target-i386/translate.c. I checked helper_pext
in target-i386/int_helper.c and it works fine.

I ran my program on a CPU with BMI2 instruction set too, and it indeed
returns different values.

I didn't check pdep, it could have the same problem.

$ qemu-x86_64 --version
qemu-x86_64 version 2.6.50 (v2.6.0-2095-ge66b05e-dirty), Copyright (c) 2003-2008 Fabrice Bellard

$ uname -a
Linux lenard-hp 4.3.0-1-amd64 #1 SMP Debian 4.3.5-1 (2016-02-06) x86_64 GNU/Linux

I compiled the attached file with the command line "gcc -o main -g -mbmi2 main.c".

$ gcc --version
gcc (Debian 5.4.0-6) 5.4.0 20160609

Best regards,
Lénárd Szolnoki



Paolo sent a patch here:
https://lists.gnu.org/archive/html/qemu-devel/2020-11/msg05700.html

Fix has been committed:
https://git.qemu.org/?p=qemu.git;a=commitdiff;h=75b208c28316095c4685