mirror of https://github.com/PCSX2/pcsx2.git
mVU: Fix jump caching when using doJumpAsSameProgram. This is by default
This commit is contained in:
parent
ee07f860fc
commit
413fd004da
|
@ -775,6 +775,16 @@ __fi void* mVUblockFetch(microVU& mVU, u32 startPC, uptr pState) {
|
|||
// mVUcompileJIT() - Called By JR/JALR during execution
|
||||
_mVUt void* __fastcall mVUcompileJIT(u32 startPC, uptr ptr) {
|
||||
if (doJumpAsSameProgram) { // Treat jump as part of same microProgram
|
||||
if (doJumpCaching) { // When doJumpCaching, ptr is a microBlock pointer
|
||||
microVU& mVU = mVUx;
|
||||
microBlock* pBlock = (microBlock*)ptr;
|
||||
microJumpCache& jc = pBlock->jumpCache[startPC / 8];
|
||||
if (jc.prog && jc.prog == mVU.prog.quick[startPC / 8].prog) return jc.x86ptrStart;
|
||||
void* v = mVUblockFetch(mVUx, startPC, (uptr)&pBlock->pStateEnd);
|
||||
jc.prog = mVU.prog.quick[startPC / 8].prog;
|
||||
jc.x86ptrStart = v;
|
||||
return v;
|
||||
}
|
||||
return mVUblockFetch(mVUx, startPC, ptr);
|
||||
}
|
||||
mVUx.regs().start_pc = startPC;
|
||||
|
|
Loading…
Reference in New Issue