Merge pull request #4766 from lioncash/dspemitter
DSPCore: Move CompileCurrent to the DSPEmitter
This commit is contained in:
commit
f37c5f1f1c
|
@ -314,28 +314,6 @@ void DSPCore_Step()
|
||||||
step_event.Set();
|
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)
|
u16 DSPCore_ReadRegister(size_t reg)
|
||||||
{
|
{
|
||||||
switch (reg)
|
switch (reg)
|
||||||
|
|
|
@ -354,8 +354,6 @@ void DSPCore_SetExternalInterrupt(bool val);
|
||||||
// sets a flag in the pending exception register.
|
// sets a flag in the pending exception register.
|
||||||
void DSPCore_SetException(u8 level);
|
void DSPCore_SetException(u8 level);
|
||||||
|
|
||||||
void CompileCurrent();
|
|
||||||
|
|
||||||
enum DSPCoreState
|
enum DSPCoreState
|
||||||
{
|
{
|
||||||
DSPCORE_STOP = 0,
|
DSPCORE_STOP = 0,
|
||||||
|
|
|
@ -352,6 +352,28 @@ void DSPEmitter::Compile(u16 start_addr)
|
||||||
JMP(m_return_dispatcher, true);
|
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* DSPEmitter::CompileStub()
|
||||||
{
|
{
|
||||||
const u8* entryPoint = AlignCode16();
|
const u8* entryPoint = AlignCode16();
|
||||||
|
|
Loading…
Reference in New Issue