mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-14 21:37:52 -07:00
DSPCore: Move JIT cycle code to DSPEmitter
Moves x86-specific emitter code out of DSPCore.
This commit is contained in:
parent
5da565a1a1
commit
0d42cbc923
@ -245,21 +245,7 @@ int DSPCore_RunCycles(int cycles)
|
||||
{
|
||||
if (g_dsp_jit)
|
||||
{
|
||||
if (g_dsp.external_interrupt_waiting)
|
||||
{
|
||||
DSPCore_CheckExternalInterrupt();
|
||||
DSPCore_CheckExceptions();
|
||||
DSPCore_SetExternalInterrupt(false);
|
||||
}
|
||||
|
||||
g_cycles_left = cycles;
|
||||
auto exec_addr = (JIT::x86::DSPEmitter::DSPCompiledCode)g_dsp_jit->m_enter_dispatcher;
|
||||
exec_addr();
|
||||
|
||||
if (g_dsp.reset_dspjit_codespace)
|
||||
g_dsp_jit->ClearIRAMandDSPJITCodespaceReset();
|
||||
|
||||
return g_cycles_left;
|
||||
return g_dsp_jit->RunCycles(static_cast<u16>(cycles));
|
||||
}
|
||||
|
||||
while (cycles > 0)
|
||||
|
@ -48,6 +48,25 @@ DSPEmitter::~DSPEmitter()
|
||||
FreeCodeSpace();
|
||||
}
|
||||
|
||||
u16 DSPEmitter::RunCycles(u16 cycles)
|
||||
{
|
||||
if (g_dsp.external_interrupt_waiting)
|
||||
{
|
||||
DSPCore_CheckExternalInterrupt();
|
||||
DSPCore_CheckExceptions();
|
||||
DSPCore_SetExternalInterrupt(false);
|
||||
}
|
||||
|
||||
g_cycles_left = cycles;
|
||||
auto exec_addr = (DSPCompiledCode)m_enter_dispatcher;
|
||||
exec_addr();
|
||||
|
||||
if (g_dsp.reset_dspjit_codespace)
|
||||
ClearIRAMandDSPJITCodespaceReset();
|
||||
|
||||
return g_cycles_left;
|
||||
}
|
||||
|
||||
void DSPEmitter::ClearIRAM()
|
||||
{
|
||||
for (int i = 0x0000; i < 0x1000; i++)
|
||||
|
@ -32,6 +32,8 @@ public:
|
||||
DSPEmitter();
|
||||
~DSPEmitter();
|
||||
|
||||
u16 RunCycles(u16 cycles);
|
||||
|
||||
void EmitInstruction(UDSPInstruction inst);
|
||||
void ClearIRAM();
|
||||
void ClearIRAMandDSPJITCodespaceReset();
|
||||
|
Loading…
Reference in New Issue
Block a user