From b78ad83f008bee30562f87296a509e229536d40c Mon Sep 17 00:00:00 2001 From: Henrik Rydgard Date: Tue, 8 Jan 2013 14:29:03 +0100 Subject: [PATCH] R10, not R9, points to the mips state... --- Core/MIPS/ARM/ArmCompBranch.cpp | 2 +- Core/MIPS/ARM/ArmJit.cpp | 5 ++--- Core/MIPS/ARM/ArmRegCache.cpp | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/Core/MIPS/ARM/ArmCompBranch.cpp b/Core/MIPS/ARM/ArmCompBranch.cpp index 19a557e4c..191b5fa5d 100644 --- a/Core/MIPS/ARM/ArmCompBranch.cpp +++ b/Core/MIPS/ARM/ArmCompBranch.cpp @@ -369,7 +369,7 @@ void Jit::Comp_JumpReg(u32 op) case 8: //jr break; case 9: //jalr - ADD(R1, R9, MIPS_REG_RA * 4); // compute address of RA in ram + ADD(R1, R10, MIPS_REG_RA * 4); // compute address of RA in ram ARMABI_MOVI2R(R2, js.compilerPC + 8); STR(R1, R2); break; diff --git a/Core/MIPS/ARM/ArmJit.cpp b/Core/MIPS/ARM/ArmJit.cpp index 1cf1edbb1..08af4719c 100644 --- a/Core/MIPS/ARM/ArmJit.cpp +++ b/Core/MIPS/ARM/ArmJit.cpp @@ -143,7 +143,6 @@ const u8 *Jit::DoJit(u32 em_address, ArmJitBlock *b) } #endif - NOP(); AlignCode16(); b->originalSize = numInstructions; return b->normalEntry; @@ -168,11 +167,11 @@ void Jit::Comp_Generic(u32 op) } void Jit::MovFromPC(ARMReg r) { - LDR(r, R9, offsetof(MIPSState, pc)); + LDR(r, R10, offsetof(MIPSState, pc)); } void Jit::MovToPC(ARMReg r) { - STR(R9, r, offsetof(MIPSState, pc)); + STR(R10, r, offsetof(MIPSState, pc)); } void Jit::DoDownCount() diff --git a/Core/MIPS/ARM/ArmRegCache.cpp b/Core/MIPS/ARM/ArmRegCache.cpp index 49b4f5fd0..84488dea8 100644 --- a/Core/MIPS/ARM/ArmRegCache.cpp +++ b/Core/MIPS/ARM/ArmRegCache.cpp @@ -21,7 +21,7 @@ using namespace ArmGen; -#define CTXREG ((ARMReg)9) +#define CTXREG (R10) ArmRegCache::ArmRegCache(MIPSState *mips) : mips_(mips) { }