]> git.ipfire.org Git - thirdparty/qemu.git/commit
target/sh4: Fix mac.l with saturation enabled
authorZack Buhman <zack@buhman.org>
Sat, 6 Apr 2024 01:17:39 +0000 (15:17 -1000)
committerRichard Henderson <richard.henderson@linaro.org>
Tue, 9 Apr 2024 17:43:31 +0000 (07:43 -1000)
commitc97e8977dcacb3fa8362ee28bcee75ceb01fceaa
treef40cc4213017d220ec95e3674f0428a8cce12f34
parent7d95db5e78a24d3315e3112d26909a7262355cb7
target/sh4: Fix mac.l with saturation enabled

The saturation arithmetic logic in helper_macl is not correct.
I tested and verified this behavior on a SH7091.

Signed-off-by: Zack Buhman <zack@buhman.org>
Message-Id: <20240404162641.27528-2-zack@buhman.org>
[rth: Reformat helper_macl, add a test case.]
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
target/sh4/helper.h
target/sh4/op_helper.c
tests/tcg/sh4/Makefile.target
tests/tcg/sh4/test-macl.c [new file with mode: 0644]