From 0c6ed7ca33c193fafc9bf4c7b0197af4f65e3ec5 Mon Sep 17 00:00:00 2001 From: Rafael Caetano Date: Mon, 28 Aug 2023 23:51:01 +0100 Subject: [PATCH] Always allocate R15 for LDR_PCREL instruction, even if literal optimizations are enabled This fixes crashes on some games when accessing an invalid literal through this instruction --- 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 a7171ba..aebacf8 100644 --- a/src/ARM_InstrInfo.cpp +++ b/src/ARM_InstrInfo.cpp @@ -386,8 +386,8 @@ Info Decode(bool thumb, u32 num, u32 instr) { if (res.Kind == tk_LDR_PCREL) { - if (!ARMJIT::LiteralOptimizations) - res.SrcRegs |= 1 << 15; + //if (!ARMJIT::LiteralOptimizations) + res.SrcRegs |= 1 << 15; res.SpecialKind = special_LoadLiteral; } else