From: kub Date: Sun, 14 Nov 2021 20:16:51 +0000 (+0100) Subject: sh2 drc, fix arm32 ld/st offset for -256 X-Git-Tag: v2.00~413 X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=97be0d15b6e271d46cceba516f708d98c84bd647;p=picodrive.git sh2 drc, fix arm32 ld/st offset for -256 --- 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