From ec21172cd9932805f02d84f41599c7a23e3b23f5 Mon Sep 17 00:00:00 2001 From: RSDuck Date: Sat, 17 Aug 2019 14:58:37 +0200 Subject: [PATCH] fix register alloc for half word loads fixes Mega Man Star Force 2 with cheat applied it probably used a pc relative load which were interpreted as branches --- src/ARM_InstrInfo.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ARM_InstrInfo.cpp b/src/ARM_InstrInfo.cpp index b70c8dca..48137991 100644 --- a/src/ARM_InstrInfo.cpp +++ b/src/ARM_InstrInfo.cpp @@ -127,8 +127,8 @@ A_IMPLEMENT_WB_LDRSTR(LDRB,LDR) #define A_STRD A_Read12Double #define A_IMPLEMENT_HD_LDRSTR(x,k) \ - const u32 A_##x##_IMM = A_##k | A_Read16 | A_Write16 | ak(ak_##x##_IMM); \ - const u32 A_##x##_REG = A_##k | A_Read16 | A_Write16 | A_Read0 | ak(ak_##x##_REG); \ + const u32 A_##x##_IMM = A_##k | A_Read16 | A_MemWriteback | ak(ak_##x##_IMM); \ + const u32 A_##x##_REG = A_##k | A_Read16 | A_MemWriteback | A_Read0 | ak(ak_##x##_REG); \ const u32 A_##x##_POST_IMM = A_##k | A_Read16 | A_Write16 | ak(ak_##x##_POST_IMM); \ const u32 A_##x##_POST_REG = A_##k | A_Read16 | A_Write16 | A_Read0 | ak(ak_##x##_POST_REG);