From: Zack Buhman <zack@buhman.org>
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>
---
target/sh4/helper.h | 2 +-
target/sh4/op_helper.c | 23 ++++++------
tests/tcg/sh4/test-macl.c | 67 +++++++++++++++++++++++++++++++++++
tests/tcg/sh4/Makefile.target | 5 +++
4 files changed, 86 insertions(+), 11 deletions(-)
create mode 100644 tests/tcg/sh4/test-macl.c