From f49efa8868ed7435c01f139b91a69b8538494454 Mon Sep 17 00:00:00 2001 From: skidau Date: Mon, 10 Jan 2011 03:03:03 +0000 Subject: [PATCH] LLE JIT: The block linker will now recompile all blocks that it encounters immediately. Gives a speed boost in some games. Also removed an extraneous check for external exceptions. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6801 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Core/DSPCore/Src/DSPCore.cpp | 21 +++++++++++++++++---- Source/Core/DSPCore/Src/DSPEmitter.cpp | 2 -- Source/Core/DSPCore/Src/DSPEmitter.h | 1 + 3 files changed, 18 insertions(+), 6 deletions(-) diff --git a/Source/Core/DSPCore/Src/DSPCore.cpp b/Source/Core/DSPCore/Src/DSPCore.cpp index ede578de32..92e48da47e 100644 --- a/Source/Core/DSPCore/Src/DSPCore.cpp +++ b/Source/Core/DSPCore/Src/DSPCore.cpp @@ -174,10 +174,6 @@ void DSPCore_SetException(u8 level) // Comming from the CPU void DSPCore_CheckExternalInterrupt() { - // check if there is an external interrupt - if (! (g_dsp.cr & CR_EXTERNAL_INT)) - return; - if (! dsp_SR_is_flag_set(SR_EXT_INT_ENABLE)) return; @@ -291,6 +287,23 @@ void DSPCore_Step() void CompileCurrent() { jit->Compile(g_dsp.pc); + + bool retry = true; + + while (retry) + { + retry = false; + for(u16 i = 0x0000; i < 0xffff; ++i) + { + if (!jit->unresolvedJumps[i].empty()) + { + u16 addrToCompile = jit->unresolvedJumps[i].front(); + jit->Compile(addrToCompile); + if (!jit->unresolvedJumps[i].empty()) + retry = true; + } + } + } } u16 DSPCore_ReadRegister(int reg) { diff --git a/Source/Core/DSPCore/Src/DSPEmitter.cpp b/Source/Core/DSPCore/Src/DSPEmitter.cpp index ebe8bee40f..f3ee9f16e2 100644 --- a/Source/Core/DSPCore/Src/DSPEmitter.cpp +++ b/Source/Core/DSPCore/Src/DSPEmitter.cpp @@ -30,8 +30,6 @@ using namespace Gen; -const u8 *stubEntryPoint; - DSPEmitter::DSPEmitter() : storeIndex(-1), storeIndex2(-1) { m_compiledCode = NULL; diff --git a/Source/Core/DSPCore/Src/DSPEmitter.h b/Source/Core/DSPCore/Src/DSPEmitter.h index 56749b228b..a4acfcb4fc 100644 --- a/Source/Core/DSPCore/Src/DSPEmitter.h +++ b/Source/Core/DSPCore/Src/DSPEmitter.h @@ -250,6 +250,7 @@ public: // CALL this to start the dispatcher const u8 *enterDispatcher; + const u8 *stubEntryPoint; u16 compilePC; u16 startAddr; CompiledCode *blockLinks;