qemu/tests/tcg
Paolo Bonzini d1bb978ba1 target/i386: fix cmpxchg with 32-bit register destination
Unlike the memory case, where "the destination operand receives a write
cycle without regard to the result of the comparison", rm must not be
touched altogether if the write fails, including not zero-extending
it on 64-bit processors.  This is not how the movcond currently works,
because it is always followed by a gen_op_mov_reg_v to rm.

To fix it, introduce a new function that is similar to gen_op_mov_reg_v
but writes to a TCG temporary.

Considering that gen_extu(ot, oldv) is not needed in the memory case
either, the two cases for register and memory destinations are different
enough that one might as well fuse the two "if (mod == 3)" into one.
So do that too.

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/508
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
[rth: Add a test case ]
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
2022-11-15 09:34:42 +10:00
..
aarch64 tests/tcg: move compiler tests to Makefiles 2022-10-06 11:53:40 +01:00
alpha
arm tests/tcg: clean up calls to run-test 2022-10-06 11:53:40 +01:00
cris tests/tcg: clean up calls to run-test 2022-10-06 11:53:40 +01:00
hexagon Hexagon (tests/tcg/hexagon): add fmin/fmax tests for signed zero 2022-09-19 11:55:23 -07:00
hppa target/hppa: Fix atomic_store_3 for STBY 2021-12-30 21:40:47 -08:00
i386 target/i386: implement FMA instructions 2022-10-22 09:05:54 +02:00
loongarch64 target/loongarch: Remove cpu_fcsr0 2022-08-08 19:42:53 -07:00
m68k tests/tcg/m68k: Add trap.c 2022-06-02 09:35:03 +02:00
minilib Remove leading underscores from QEMU defines 2021-06-21 05:49:01 +02:00
mips
multiarch tests/tcg/multiarch: Add munmap-pthread.c 2022-11-01 08:31:41 +11:00
nios2 tests/tcg/nios2: Tweak 10m50-ghrd.ld 2022-10-31 20:37:58 +00:00
openrisc
ppc
ppc64 tests/tcg: move compiler tests to Makefiles 2022-10-06 11:53:40 +01:00
ppc64le tests/tcg: unify ppc64 and ppc64le Makefiles 2022-10-06 11:53:40 +01:00
riscv64 target/riscv: Make translator stop before the end of a page 2022-09-06 08:04:26 +01:00
s390x tests/tcg/s390x: Add a test for the vistr instruction 2022-10-28 08:34:58 +02:00
sh4 tests/tcg: re-enable threadcount for sh4 2022-10-31 20:37:59 +00:00
sparc64 tests/tcg/sparc64: Re-enable linux-test 2021-05-15 21:43:23 +02:00
tricore tests/tcg/tricore: Add muls test 2021-05-18 09:36:21 +01:00
x86_64 target/i386: fix cmpxchg with 32-bit register destination 2022-11-15 09:34:42 +10:00
xtensa tests/tcg/xtensa: fix vectors and checks in timer test 2022-05-06 15:27:40 -07:00
Makefile.target tests/tcg: move compiler tests to Makefiles 2022-10-06 11:53:40 +01:00
README Drop the deprecated lm32 target 2021-05-12 18:20:25 +02:00

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".