mirror of https://github.com/PCSX2/pcsx2.git
iR3000A/iR5900: Partial revert of 8c98f5d928
("Remove mid block jumping")
This commit is contained in:
parent
ef7169dbbf
commit
2e3501366f
|
@ -1595,6 +1595,14 @@ static void iopRecRecompile(const u32 startpc)
|
|||
|
||||
while (1)
|
||||
{
|
||||
BASEBLOCK* pblock = PSX_GETBLOCK(i);
|
||||
if (i != startpc && pblock->GetFnptr() != (uptr)iopJITCompile)
|
||||
{
|
||||
// branch = 3
|
||||
willbranch3 = 1;
|
||||
s_nEndBlock = i;
|
||||
break;
|
||||
}
|
||||
|
||||
psxRegs.code = iopMemRead32(i);
|
||||
|
||||
|
|
|
@ -2294,6 +2294,8 @@ static void recRecompile(const u32 startpc)
|
|||
|
||||
while (1)
|
||||
{
|
||||
BASEBLOCK* pblock = PC_GETBLOCK(i);
|
||||
|
||||
// stop before breakpoints
|
||||
if (isBreakpointNeeded(i) != 0 || isMemcheckNeeded(i) != 0)
|
||||
{
|
||||
|
@ -2311,6 +2313,13 @@ static void recRecompile(const u32 startpc)
|
|||
eeRecPerfLog.Write("Pagesplit @ %08X : size=%d insts", startpc, (i - startpc) / 4);
|
||||
break;
|
||||
}
|
||||
|
||||
if (pblock->GetFnptr() != (uptr)JITCompile)
|
||||
{
|
||||
willbranch3 = 1;
|
||||
s_nEndBlock = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
//HUH ? PSM ? whut ? THIS IS VIRTUAL ACCESS GOD DAMMIT
|
||||
|
@ -2614,6 +2623,34 @@ StartRecomp:
|
|||
pxAssert((pc - startpc) >> 2 <= 0xffff);
|
||||
s_pCurBlockEx->size = (pc - startpc) >> 2;
|
||||
|
||||
if (HWADDR(pc) <= Ps2MemSize::ExposedRam)
|
||||
{
|
||||
BASEBLOCKEX* oldBlock;
|
||||
int i;
|
||||
|
||||
i = recBlocks.LastIndex(HWADDR(pc) - 4);
|
||||
while ((oldBlock = recBlocks[i--]))
|
||||
{
|
||||
if (oldBlock == s_pCurBlockEx)
|
||||
continue;
|
||||
if (oldBlock->startpc >= HWADDR(pc))
|
||||
continue;
|
||||
if ((oldBlock->startpc + oldBlock->size * 4) <= HWADDR(startpc))
|
||||
break;
|
||||
|
||||
if (memcmp(&recRAMCopy[oldBlock->startpc / 4], PSM(oldBlock->startpc),
|
||||
oldBlock->size * 4))
|
||||
{
|
||||
recClear(startpc, (pc - startpc) / 4);
|
||||
s_pCurBlockEx = recBlocks.Get(HWADDR(startpc));
|
||||
pxAssert(s_pCurBlockEx->startpc == HWADDR(startpc));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
memcpy(&recRAMCopy[HWADDR(startpc) / 4], PSM(startpc), pc - startpc);
|
||||
}
|
||||
|
||||
s_pCurBlock->SetFnptr((uptr)recPtr);
|
||||
|
||||
if (!(pc & 0x10000000))
|
||||
|
|
Loading…
Reference in New Issue