R10, not R9, points to the mips state...

This commit is contained in:
Henrik Rydgard 2013-01-08 14:29:03 +01:00
parent 7b4cfb702c
commit b78ad83f00
3 changed files with 4 additions and 5 deletions

View File

@ -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;

View File

@ -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()

View File

@ -21,7 +21,7 @@
using namespace ArmGen;
#define CTXREG ((ARMReg)9)
#define CTXREG (R10)
ArmRegCache::ArmRegCache(MIPSState *mips) : mips_(mips) {
}