qemu/tests/tcg
Philippe Mathieu-Daudé e88a856efd target/sh4: Fix SUBV opcode
The documentation says:

  SUBV Rm, Rn        Rn - Rm -> Rn, underflow -> T

The overflow / underflow can be calculated as:

  T = ((Rn ^ Rm) & (Result ^ Rn)) >> 31

However we were using the incorrect:

  T = ((Rn ^ Rm) & (Result ^ Rm)) >> 31

Fix by using the Rn register instead of Rm.

Add tests provided by Paul Cercueil.

Cc: qemu-stable@nongnu.org
Fixes: ad8d25a11f ("target-sh4: implement addv and subv using TCG")
Reported-by: Paul Cercueil <paul@crapouillou.net>
Suggested-by: Paul Cercueil <paul@crapouillou.net>
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2318
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Yoshinori Sato <ysato@users.sourceforge.jp>
Message-Id: <20240430163125.77430-3-philmd@linaro.org>
2024-05-03 17:33:26 +02:00
..
aarch64 tcg/optimize: Do not attempt to constant fold neg_vec 2024-04-09 07:43:11 -10:00
alpha tests/tcg: Remove run-test-mmap-* 2024-02-29 11:35:37 -10:00
arm tests/tcg: Remove run-test-mmap-* 2024-02-29 11:35:37 -10: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 tests/tcg: Remove run-test-mmap-* 2024-02-29 11:35:37 -10:00
i386 tests/tcg: Remove run-test-mmap-* 2024-02-29 11:35:37 -10:00
loongarch64 hw/loongarch/virt: Remove unused 'loongarch_virt_pm' region 2023-10-13 10:04:52 +08:00
m68k tests/tcg: Remove run-test-mmap-* 2024-02-29 11:35:37 -10: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: Test shmat(NULL) 2024-03-26 18:20:36 -10:00
openrisc target/openrisc: Rename the cpu from or32 to or1k 2017-02-14 08:14:58 +11:00
ppc64 tests/tcg: finesse the registers check for "hidden" regs 2023-11-23 14:10:06 +00:00
ppc64le tests/tcg: unify ppc64 and ppc64le Makefiles 2022-10-06 11:53:40 +01:00
riscv64 tests: riscv64: Use 'zfa' instead of 'Zfa' 2024-03-08 20:48:03 +10:00
s390x tests/tcg/s390x: Test TEST AND SET 2024-03-25 15:05:59 +01:00
sh4 target/sh4: Fix SUBV opcode 2024-05-03 17:33:26 +02:00
tricore tests/tcg: Reset result register after each test 2023-09-29 08:28:09 +02:00
x86_64 tests/tcg: update licenses to GPLv2 as intended 2024-02-28 09:09:04 +00:00
xtensa tests/tcg/xtensa: add icount/ibreak priority test 2024-01-19 12:28:59 +01:00
xtensaeb tcg: Correct invalid mentions of 'softmmu' by 'system-mode' 2023-10-07 19:02:33 +02:00
Makefile.target tests/plugin/mem: migrate to new per_vcpu API 2024-03-06 12:35:33 +00: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".