mirror of
https://github.com/melonDS-emu/melonDS.git
synced 2025-07-24 14:49:53 -06:00
add back faster prefetch for ARM9
This commit is contained in:
@ -144,7 +144,10 @@ void ARM::SetupCodeMem(u32 addr)
|
||||
}
|
||||
else
|
||||
{
|
||||
NDS::ARM7GetMemRegion(addr, false, &CodeMem);
|
||||
// not sure it's worth it for the ARM7
|
||||
// esp. as everything there generally runs on WRAM
|
||||
// and due to how it's mapped, we can't use this optimization
|
||||
//NDS::ARM7GetMemRegion(addr, false, &CodeMem);
|
||||
}
|
||||
}
|
||||
|
||||
@ -176,7 +179,7 @@ void ARMv5::JumpTo(u32 addr, bool restorecpsr)
|
||||
addr &= ~0x1;
|
||||
R[15] = addr+2;
|
||||
|
||||
//if (newregion != oldregion) SetupCodeMem(addr);
|
||||
if (newregion != oldregion) SetupCodeMem(addr);
|
||||
|
||||
// two-opcodes-at-once fetch
|
||||
// doesn't matter if we put garbage in the MSbs there
|
||||
@ -200,7 +203,7 @@ void ARMv5::JumpTo(u32 addr, bool restorecpsr)
|
||||
addr &= ~0x3;
|
||||
R[15] = addr+4;
|
||||
|
||||
//if (newregion != oldregion) SetupCodeMem(addr);
|
||||
if (newregion != oldregion) SetupCodeMem(addr);
|
||||
|
||||
NextInstr[0] = CodeRead32(addr);
|
||||
NextInstr[1] = CodeRead32(addr+4);
|
||||
|
@ -514,6 +514,8 @@ u32 ARMv5::CodeRead32(u32 addr)
|
||||
return *(u32*)&ITCM[addr & 0x7FFF];
|
||||
}
|
||||
|
||||
if (CodeMem.Mem) return *(u32*)&CodeMem.Mem[addr & CodeMem.Mask];
|
||||
|
||||
return NDS::ARM9Read32(addr);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user