JIT: base

all instructions are interpreted
This commit is contained in:
RSDuck
2019-06-22 01:28:32 +02:00
parent d2f05cd30f
commit c5c342c009
28 changed files with 7743 additions and 4 deletions

View File

@ -21,6 +21,7 @@
#include "ARM.h"
#include "ARMInterpreter.h"
#include "AREngine.h"
#include "ARMJIT.h"
// instruction timing notes
@ -481,7 +482,7 @@ void ARMv5::Execute()
while (NDS::ARM9Timestamp < NDS::ARM9Target)
{
if (CPSR & 0x20) // THUMB
/*if (CPSR & 0x20) // THUMB
{
// prefetch
R[15] += 2;
@ -514,7 +515,15 @@ void ARMv5::Execute()
}
else
AddCycles_C();
}
}*/
if (!ARMJIT::IsMapped(Num, R[15] - ((CPSR&0x20)?2:4)))
printf("aaarg ungempappter raum %x\n", R[15]);
ARMJIT::CompiledBlock block = ARMJIT::LookUpBlock(Num, R[15] - ((CPSR&0x20)?2:4));
if (block == NULL)
block = ARMJIT::CompileBlock(this);
Cycles += block();
// TODO optimize this shit!!!
if (Halted)