From 97be0d15b6e271d46cceba516f708d98c84bd647 Mon Sep 17 00:00:00 2001 From: kub Date: Sun, 14 Nov 2021 21:16:51 +0100 Subject: [PATCH] sh2 drc, fix arm32 ld/st offset for -256 --- cpu/sh2/compiler.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpu/sh2/compiler.c b/cpu/sh2/compiler.c index bb2206c1..7e622cda 100644 --- a/cpu/sh2/compiler.c +++ b/cpu/sh2/compiler.c @@ -2615,7 +2615,7 @@ static uptr split_address(uptr la, uptr mask, s32 *offs) // arm32 offset has an add/sub flag and an unsigned 8 bit value, which only // allows values of [-255...255]. the value -256 thus can't be used. if (*offs + sign == 0) { - la += sign; + la -= sign; *offs += sign; } #endif -- 2.39.2