qemu-e2k/tests/tcg
Paolo Bonzini e7bbb7cb71 target/i386: introduce flags writeback mechanism
ALU instructions can write to both memory and flags.  If the CC_SRC*
and CC_DST locations have been written already when a memory access
causes a fault, the value in CC_SRC* and CC_DST might be interpreted
with the wrong CC_OP (the one that is in effect before the instruction.

Besides just using the wrong result for the flags, something like
subtracting -1 can have disastrous effects if the current CC_OP is
CC_OP_EFLAGS: this is because QEMU does not expect bits outside the ALU
flags to be set in CC_SRC, and env->eflags can end up set to all-ones.
In the case of the attached testcase, this sets IOPL to 3 and would
cause an assertion failure if SUB is moved to the new decoder.

This mechanism is not really needed for BMI instructions, which can
only write to a register, but put it to use anyway for cleanliness.
In the case of BZHI, the code has to be modified slightly to ensure
that decode->cc_src is written, otherwise the new assertions trigger.

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2023-12-29 22:04:30 +01:00
..
aarch64 target/arm: Handle overflow in calculation of next timer tick 2023-11-27 15:27:36 +00:00
alpha tests/tcg/alpha: Add test for cvttq 2023-07-01 08:26:54 +02:00
arm tests/tcg: enable semiconsole test for Arm 2023-11-23 14:10:06 +00:00
cris tests/tcg: Add -fno-stack-protector 2023-10-31 13:28:19 +00:00
hexagon tests/tcg: Add -fno-stack-protector 2023-10-31 13:28:19 +00:00
hppa
i386 target/i386: introduce flags writeback mechanism 2023-12-29 22:04:30 +01:00
loongarch64 hw/loongarch/virt: Remove unused 'loongarch_virt_pm' region 2023-10-13 10:04:52 +08:00
m68k fpu: Handle m68k extended precision denormals properly 2023-09-16 14:57:16 +00:00
minilib tests/tcg: Add -fno-stack-protector 2023-10-31 13:28:19 +00:00
mips tests/tcg: Add -fno-stack-protector 2023-10-31 13:28:19 +00:00
multiarch tests/tcg: finesse the registers check for "hidden" regs 2023-11-23 14:10:06 +00:00
nios2 Revert "tests/tcg/nios2: Re-enable linux-user tests" 2023-11-08 15:15:23 +00:00
openrisc
ppc
ppc64 tests/tcg: finesse the registers check for "hidden" regs 2023-11-23 14:10:06 +00:00
ppc64le
riscv64 riscv: Add support for the Zfa extension 2023-07-10 22:29:20 +10:00
s390x tests/tcg: finesse the registers check for "hidden" regs 2023-11-23 14:10:06 +00:00
sh4
sparc64
tricore tests/tcg: Reset result register after each test 2023-09-29 08:28:09 +02:00
x86_64 other architectures: spelling fixes 2023-07-25 17:14:07 +03:00
xtensa tcg: Correct invalid mentions of 'softmmu' by 'system-mode' 2023-10-07 19:02:33 +02:00
xtensaeb tcg: Correct invalid mentions of 'softmmu' by 'system-mode' 2023-10-07 19:02:33 +02:00
Makefile.target tests/tcg: Add -fno-stack-protector 2023-10-31 13:28:19 +00:00
README

This directory contains various interesting guest programs for
regression testing. Tests are either multi-arch, meaning they can be
built for all guest architectures that support linux-user executable,
or they are architecture specific.

CRIS
====
The testsuite for CRIS is in tests/tcg/cris.  You can run it
with "make test-cris".