* [Qemu-devel] [Bug 1605123] [NEW] PEXT returns wrong values, seemingly switches arguments
@ 2016-07-21 8:36 Lenard Szolnoki
2020-11-24 16:49 ` [Bug 1605123] " Thomas Huth
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Lenard Szolnoki @ 2016-07-21 8:36 UTC (permalink / raw)
To: qemu-devel
Public bug reported:
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
** Affects: qemu
Importance: Undecided
Status: New
** Attachment added: "main.c"
https://bugs.launchpad.net/bugs/1605123/+attachment/4704470/+files/main.c
--
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1605123
Title:
PEXT returns wrong values, seemingly switches arguments
Status in QEMU:
New
Bug description:
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
To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1605123/+subscriptions
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug 1605123] Re: PEXT returns wrong values, seemingly switches arguments
2016-07-21 8:36 [Qemu-devel] [Bug 1605123] [NEW] PEXT returns wrong values, seemingly switches arguments Lenard Szolnoki
@ 2020-11-24 16:49 ` Thomas Huth
2021-01-19 6:35 ` Thomas Huth
2021-04-30 8:21 ` Thomas Huth
2 siblings, 0 replies; 4+ messages in thread
From: Thomas Huth @ 2020-11-24 16:49 UTC (permalink / raw)
To: qemu-devel
Paolo sent a patch here:
https://lists.gnu.org/archive/html/qemu-devel/2020-11/msg05700.html
--
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1605123
Title:
PEXT returns wrong values, seemingly switches arguments
Status in QEMU:
New
Bug description:
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
To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1605123/+subscriptions
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug 1605123] Re: PEXT returns wrong values, seemingly switches arguments
2016-07-21 8:36 [Qemu-devel] [Bug 1605123] [NEW] PEXT returns wrong values, seemingly switches arguments Lenard Szolnoki
2020-11-24 16:49 ` [Bug 1605123] " Thomas Huth
@ 2021-01-19 6:35 ` Thomas Huth
2021-04-30 8:21 ` Thomas Huth
2 siblings, 0 replies; 4+ messages in thread
From: Thomas Huth @ 2021-01-19 6:35 UTC (permalink / raw)
To: qemu-devel
Fix has been committed:
https://git.qemu.org/?p=qemu.git;a=commitdiff;h=75b208c28316095c4685
** Changed in: qemu
Status: New => Fix Committed
--
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1605123
Title:
PEXT returns wrong values, seemingly switches arguments
Status in QEMU:
Fix Committed
Bug description:
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
To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1605123/+subscriptions
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug 1605123] Re: PEXT returns wrong values, seemingly switches arguments
2016-07-21 8:36 [Qemu-devel] [Bug 1605123] [NEW] PEXT returns wrong values, seemingly switches arguments Lenard Szolnoki
2020-11-24 16:49 ` [Bug 1605123] " Thomas Huth
2021-01-19 6:35 ` Thomas Huth
@ 2021-04-30 8:21 ` Thomas Huth
2 siblings, 0 replies; 4+ messages in thread
From: Thomas Huth @ 2021-04-30 8:21 UTC (permalink / raw)
To: qemu-devel
** Changed in: qemu
Status: Fix Committed => Fix Released
--
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1605123
Title:
PEXT returns wrong values, seemingly switches arguments
Status in QEMU:
Fix Released
Bug description:
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
To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1605123/+subscriptions
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-04-30 8:37 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-21 8:36 [Qemu-devel] [Bug 1605123] [NEW] PEXT returns wrong values, seemingly switches arguments Lenard Szolnoki
2020-11-24 16:49 ` [Bug 1605123] " Thomas Huth
2021-01-19 6:35 ` Thomas Huth
2021-04-30 8:21 ` Thomas Huth
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.