DSPCore: Move CompileCurrent to the DSPEmitter

This is only ever used here.
This commit is contained in:
Lioncash 2017-01-27 01:36:25 -05:00
parent 017e8050b6
commit 4003360bcb
3 changed files with 22 additions and 24 deletions

View File

@ -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)

View File

@ -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,

View File

@ -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();