qemu-e2k/tests
Paolo Bonzini 60c7dd22e1 target/i386: fix ADOX followed by ADCX
When ADCX is followed by ADOX or vice versa, the second instruction's
carry comes from EFLAGS and the condition codes use the CC_OP_ADCOX
operation.  Retrieving the carry from EFLAGS is handled by this bit
of gen_ADCOX:

        tcg_gen_extract_tl(carry_in, cpu_cc_src,
            ctz32(cc_op == CC_OP_ADCX ? CC_C : CC_O), 1);

Unfortunately, in this case cc_op has been overwritten by the previous
"if" statement to CC_OP_ADCOX.  This works by chance when the first
instruction is ADCX; however, if the first instruction is ADOX,
ADCX will incorrectly take its carry from OF instead of CF.

Fix by moving the computation of the new cc_op at the end of the function.
The included exhaustive test case fails without this patch and passes
afterwards.

Because ADCX/ADOX need not be invoked through the VEX prefix, this
regression bisects to commit 16fc5726a6 ("target/i386: reimplement
0x0f 0x38, add AVX", 2022-10-18).  However, the mistake happened a
little earlier, when BMI instructions were rewritten using the new
decoder framework.

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1471
Reported-by: Paul Jolly <https://gitlab.com/myitcv>
Fixes: 1d0b926150 ("target/i386: move scalar 0F 38 and 0F 3A instruction to new decoder", 2022-10-18)
Cc: qemu-stable@nongnu.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2023-02-11 09:07:25 +01:00
..
avocado tests/avocado: Test Aspeed Zephyr SDK v00.01.08 on AST1030 board 2023-02-07 09:02:05 +01:00
bench
data tests: acpi: update expected blobs 2023-01-28 06:21:30 -05:00
decode
docker Testing, docs, semihosting and plugin updates 2023-02-02 18:00:41 +00:00
fp
guest-debug
image-fuzzer
include
keys
lcitool lcitool: drop texinfo from QEMU project/dependencies 2023-02-02 10:44:23 +00:00
migration tests/migration: add support for ppc64le for guestperf.py 2023-02-05 06:40:28 -03:00
multiboot
perf/block/qcow2
plugin
qapi-schema meson: replace Perl usage with Python 2023-02-02 10:44:23 +00:00
qemu-iotests iotests/detect-zeroes-registered-buf: add new test 2023-02-09 10:22:30 -05:00
qtest tests/qtest/netdev-socket: Raise connection timeout to 60 seconds 2023-02-09 11:23:53 +00:00
rocker
tcg target/i386: fix ADOX followed by ADCX 2023-02-11 09:07:25 +01:00
tsan
uefi-test-tools
unit Drop duplicate #include 2023-02-08 07:28:05 +01:00
vm lcitool: drop perl from QEMU project/dependencies 2023-02-02 10:44:23 +00:00
vmstate-static-checker-data
check-block.sh
dbus-vmstate-daemon.sh
Makefile.include
meson.build
requirements.txt
test-qht-par.c
vhost-user-bridge.c