diff options
| author | Lioncash <mathew1800@gmail.com> | 2017-01-27 01:36:25 -0500 |
|---|---|---|
| committer | Lioncash <mathew1800@gmail.com> | 2017-01-27 01:36:29 -0500 |
| commit | 4003360bcb8978bf0673d75fe0a994eaee088118 (patch) | |
| tree | b116cac59310a09497b7a959d7de137ae6cb674f /Source/Core | |
| parent | 017e8050b64ca86ce6ca91092b07bc078bb0ba75 (diff) | |
DSPCore: Move CompileCurrent to the DSPEmitter
This is only ever used here.
Diffstat (limited to 'Source/Core')
| -rw-r--r-- | Source/Core/Core/DSP/DSPCore.cpp | 22 | ||||
| -rw-r--r-- | Source/Core/Core/DSP/DSPCore.h | 2 | ||||
| -rw-r--r-- | Source/Core/Core/DSP/Jit/DSPEmitter.cpp | 22 |
3 files changed, 22 insertions, 24 deletions
diff --git a/Source/Core/Core/DSP/DSPCore.cpp b/Source/Core/Core/DSP/DSPCore.cpp index 1582742458..712417ed37 100644 --- a/Source/Core/Core/DSP/DSPCore.cpp +++ b/Source/Core/Core/DSP/DSPCore.cpp @@ -314,28 +314,6 @@ void DSPCore_Step() step_event.Set(); } -void CompileCurrent() -{ - g_dsp_jit->Compile(g_dsp.pc); - - bool retry = true; - - while (retry) - { - retry = false; - for (u16 i = 0x0000; i < 0xffff; ++i) - { - if (!g_dsp_jit->m_unresolved_jumps[i].empty()) - { - u16 addrToCompile = g_dsp_jit->m_unresolved_jumps[i].front(); - g_dsp_jit->Compile(addrToCompile); - if (!g_dsp_jit->m_unresolved_jumps[i].empty()) - retry = true; - } - } - } -} - u16 DSPCore_ReadRegister(size_t reg) { switch (reg) diff --git a/Source/Core/Core/DSP/DSPCore.h b/Source/Core/Core/DSP/DSPCore.h index 0a2bb51159..219838996d 100644 --- a/Source/Core/Core/DSP/DSPCore.h +++ b/Source/Core/Core/DSP/DSPCore.h @@ -354,8 +354,6 @@ void DSPCore_SetExternalInterrupt(bool val); // sets a flag in the pending exception register. void DSPCore_SetException(u8 level); -void CompileCurrent(); - enum DSPCoreState { DSPCORE_STOP = 0, diff --git a/Source/Core/Core/DSP/Jit/DSPEmitter.cpp b/Source/Core/Core/DSP/Jit/DSPEmitter.cpp index 7bb5f43b63..ef73adf24f 100644 --- a/Source/Core/Core/DSP/Jit/DSPEmitter.cpp +++ b/Source/Core/Core/DSP/Jit/DSPEmitter.cpp @@ -352,6 +352,28 @@ void DSPEmitter::Compile(u16 start_addr) JMP(m_return_dispatcher, true); } +static void CompileCurrent() +{ + g_dsp_jit->Compile(g_dsp.pc); + + bool retry = true; + + while (retry) + { + retry = false; + for (u16 i = 0x0000; i < 0xffff; ++i) + { + if (!g_dsp_jit->m_unresolved_jumps[i].empty()) + { + const u16 address_to_compile = g_dsp_jit->m_unresolved_jumps[i].front(); + g_dsp_jit->Compile(address_to_compile); + if (!g_dsp_jit->m_unresolved_jumps[i].empty()) + retry = true; + } + } + } +} + const u8* DSPEmitter::CompileStub() { const u8* entryPoint = AlignCode16(); |
