qemu/tests
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
..
avocado target/nios2: Remove the deprecated Nios II target 2024-04-24 16:03:38 +02:00
bench meson: remove unused variable 2023-12-31 09:11:27 +01:00
data tests: acpi: update expected SSDT.dimmpxm blob 2024-03-18 08:42:46 -04:00
decode tests/: spelling fixes 2023-09-08 13:08:52 +03:00
docker tests: Update our CI to use CentOS Stream 9 instead of 8 2024-04-25 07:03:04 +02:00
fp tests/fp: Bump fp-test-mulAdd test timeout to 3 minutes 2024-01-12 13:23:48 +00:00
guest-debug tests/tcg: Factor out gdbstub test functions 2024-01-29 20:48:49 +10:00
image-fuzzer
include
keys
lcitool tests: Update our CI to use CentOS Stream 9 instead of 8 2024-04-25 07:03:04 +02:00
migration tests/qtest: option to suspend during migration 2024-01-04 09:52:42 +08:00
multiboot
perf/block/qcow2
plugin tests/plugin/bb: migrate to new per_vcpu API 2024-03-06 12:35:36 +00:00
qapi-schema qapi: Reject "Returns" section when command doesn't return anything 2024-03-04 07:12:40 +01:00
qemu-iotests iotests: add test for stream job with an unaligned prefetch read 2024-03-26 14:21:26 +01:00
qtest Misc HW patch queue 2024-04-25 09:43:29 -07:00
rocker
tcg target/sh4: Fix SUBV opcode 2024-05-03 17:33:26 +02:00
tsan block: remove AioContext locking 2023-12-21 22:49:27 +01:00
uefi-test-tools tests/: spelling fixes 2023-09-08 13:08:52 +03:00
unit tests/unit: Remove debug statements in test-nested-aio-poll.c 2024-04-25 15:15:25 +02:00
vm tests: Update our CI to use CentOS Stream 9 instead of 8 2024-04-25 07:03:04 +02:00
vmstate-static-checker-data
dbus-vmstate-daemon.sh
Makefile.include tests: respect --enable/--disable-download for Avocado 2023-11-24 12:07:47 +01:00
meson.build tests: only build plugins if TCG is enabled 2024-04-18 11:17:27 +02:00
test-qht-par.c
vhost-user-bridge.c