jit-ir: Fix replacement hooks.

This commit is contained in:
Unknown W. Brackets 2016-05-09 00:36:38 -07:00
parent f6d245f3c4
commit ccb8f8d77e
2 changed files with 3 additions and 1 deletions

View File

@ -384,7 +384,7 @@ u32 IRInterpret(MIPSState *mips, const IRInst *inst, const u32 *constPool, int c
const ReplacementTableEntry *f = GetReplacementFunc(funcIndex);
int cycles = f->replaceFunc();
mips->downcount -= cycles;
return mips->r[MIPS_REG_RA];
break;
}
case IROp::Break:

View File

@ -340,6 +340,8 @@ void IRJit::Comp_ReplacementFunc(MIPSOpcode op) {
MIPSCompileOp(Memory::Read_Instruction(GetCompilerPC(), true), this);
} else {
ApplyRoundingMode();
ir.Write(IROp::Downcount, 0, js.downcountAmount & 0xFF, js.downcountAmount >> 8);
ir.Write(IROp::ExitToReg, MIPS_REG_RA, 0, 0);
js.compiling = false;
}
} else {