aboutsummaryrefslogtreecommitdiff
path: root/src/ARM.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/ARM.cpp')
-rw-r--r--src/ARM.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/ARM.cpp b/src/ARM.cpp
index 6248de2..b709277 100644
--- a/src/ARM.cpp
+++ b/src/ARM.cpp
@@ -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)