mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-15 05:47:56 -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_jit)
|
||||||
{
|
{
|
||||||
if (g_dsp.external_interrupt_waiting)
|
return g_dsp_jit->RunCycles(static_cast<u16>(cycles));
|
||||||
{
|
|
||||||
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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
while (cycles > 0)
|
while (cycles > 0)
|
||||||
|
@ -48,6 +48,25 @@ DSPEmitter::~DSPEmitter()
|
|||||||
FreeCodeSpace();
|
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()
|
void DSPEmitter::ClearIRAM()
|
||||||
{
|
{
|
||||||
for (int i = 0x0000; i < 0x1000; i++)
|
for (int i = 0x0000; i < 0x1000; i++)
|
||||||
|
@ -32,6 +32,8 @@ public:
|
|||||||
DSPEmitter();
|
DSPEmitter();
|
||||||
~DSPEmitter();
|
~DSPEmitter();
|
||||||
|
|
||||||
|
u16 RunCycles(u16 cycles);
|
||||||
|
|
||||||
void EmitInstruction(UDSPInstruction inst);
|
void EmitInstruction(UDSPInstruction inst);
|
||||||
void ClearIRAM();
|
void ClearIRAM();
|
||||||
void ClearIRAMandDSPJITCodespaceReset();
|
void ClearIRAMandDSPJITCodespaceReset();
|
||||||
|
Loading…
Reference in New Issue
Block a user