diff options
author | RSDuck <rsduck@users.noreply.github.com> | 2019-06-22 01:28:32 +0200 |
---|---|---|
committer | RSDuck <rsduck@users.noreply.github.com> | 2020-06-16 11:53:05 +0200 |
commit | c692287ebab4dfdec16bb0a8ce338a4b6fe2d439 (patch) | |
tree | 227ef520beebbe860696a06948a6d95570f9741e /src/ARM.cpp | |
parent | aa6ff499f98dfbb5ca9aa8cac27fed813684eb45 (diff) |
JIT: base
all instructions are interpreted
Diffstat (limited to 'src/ARM.cpp')
-rw-r--r-- | src/ARM.cpp | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/ARM.cpp b/src/ARM.cpp index 68cac59..f2b92b4 100644 --- a/src/ARM.cpp +++ b/src/ARM.cpp @@ -22,6 +22,7 @@ #include "ARM.h" #include "ARMInterpreter.h" #include "AREngine.h" +#include "ARMJIT.h" // instruction timing notes @@ -524,7 +525,7 @@ void ARMv5::Execute() while (NDS::ARM9Timestamp < NDS::ARM9Target) { - if (CPSR & 0x20) // THUMB + /*if (CPSR & 0x20) // THUMB { // prefetch R[15] += 2; @@ -557,7 +558,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) |