jit: decrease blockcache AddrMapping size for ARM9

This commit is contained in:
RSDuck
2019-07-21 13:36:48 +02:00
parent 03b321f540
commit 4deecc7d65
5 changed files with 77 additions and 38 deletions

View File

@ -609,14 +609,14 @@ void ARMv5::ExecuteJIT()
while (NDS::ARM9Timestamp < NDS::ARM9Target)
{
u32 instrAddr = R[15] - ((CPSR&0x20)?2:4);
if (!ARMJIT::IsMapped(0, instrAddr))
if (!ARMJIT::IsMapped<0>(instrAddr))
{
NDS::ARM9Timestamp = NDS::ARM9Target;
printf("ARMv5 PC in non executable region %08X\n", R[15]);
return;
}
ARMJIT::CompiledBlock block = ARMJIT::LookUpBlock(0, instrAddr);
ARMJIT::CompiledBlock block = ARMJIT::LookUpBlock<0>(instrAddr);
Cycles += (block ? block : ARMJIT::CompileBlock(this))();
if (Halted)
@ -740,13 +740,13 @@ void ARMv4::ExecuteJIT()
while (NDS::ARM7Timestamp < NDS::ARM7Target)
{
u32 instrAddr = R[15] - ((CPSR&0x20)?2:4);
if (!ARMJIT::IsMapped(1, instrAddr))
if (!ARMJIT::IsMapped<1>(instrAddr))
{
NDS::ARM7Timestamp = NDS::ARM7Target;
printf("ARMv4 PC in non executable region %08X\n", R[15]);
return;
}
ARMJIT::CompiledBlock block = ARMJIT::LookUpBlock(1, instrAddr);
ARMJIT::CompiledBlock block = ARMJIT::LookUpBlock<1>(instrAddr);
Cycles += (block ? block : ARMJIT::CompileBlock(this))();
// TODO optimize this shit!!!