Don't zero out downcount in replacements.

It doesn't write out js.downcountAmount in any of these cases, so zeroing
it is wrong.
This commit is contained in:
Unknown W. Brackets committed 2014-08-03 13:22:30 -07:00
1 parent 5525c0a485
commit 245a2a3be0
2 files changed
+2 -6

No files matched your search

+1 -3
View File
@@ -388,7 +388,6 @@ bool Jit::ReplaceJalTo(u32 dest) {
BL(R0);
}
WriteDownCountR(R0);
js.downcountAmount = 0; // we just subtracted most of it
}
js.compilerPC += 4;
@@ -428,7 +427,7 @@ void Jit::Comp_ReplacementFunc(MIPSOpcode op)
FlushAll();
// Flushed, so R1 is safe.
LDR(R1, CTXREG, MIPS_REG_RA * 4);
js.downcountAmount = cycles;
js.downcountAmount += cycles;
WriteExitDestInR(R1);
js.compiling = false;
}
@@ -452,7 +451,6 @@ void Jit::Comp_ReplacementFunc(MIPSOpcode op)
} else {
LDR(R1, CTXREG, MIPS_REG_RA * 4);
WriteDownCountR(R0);
js.downcountAmount = 0; // we just subtracted most of it
WriteExitDestInR(R1);
js.compiling = false;
}
+1 -3
View File
@@ -444,7 +444,6 @@ bool Jit::ReplaceJalTo(u32 dest) {
MOV(32, M(&mips_->pc), Imm32(js.compilerPC));
ABI_CallFunction(entry->replaceFunc);
SUB(32, M(&currentMIPS->downcount), R(EAX));
js.downcountAmount = 0; // we just subtracted most of it
}
js.compilerPC += 4;
@@ -483,7 +482,7 @@ void Jit::Comp_ReplacementFunc(MIPSOpcode op)
} else {
FlushAll();
MOV(32, R(ECX), M(&currentMIPS->r[MIPS_REG_RA]));
js.downcountAmount = cycles;
js.downcountAmount += cycles;
WriteExitDestInReg(ECX);
js.compiling = false;
}
@@ -501,7 +500,6 @@ void Jit::Comp_ReplacementFunc(MIPSOpcode op)
} else {
MOV(32, R(ECX), M(&currentMIPS->r[MIPS_REG_RA]));
SUB(32, M(&currentMIPS->downcount), R(EAX));
js.downcountAmount = 0; // we just subtracted most of it
WriteExitDestInReg(ECX);
js.compiling = false;
}