CPU: Implement PGXP CPU Mode

This is *very* slow. You don't want to enable it if you don't need it.
It is also incompatible with the recompiler and will disable it if the
option is enabled.
This commit is contained in:
Connor McLaughlin
2020-08-19 23:26:57 +10:00
parent db6b9e3bf4
commit 2e9f656546
19 changed files with 1490 additions and 198 deletions

View File

@ -110,7 +110,8 @@ void Shutdown()
#endif
}
void Execute()
template<PGXPMode pgxp_mode>
static void ExecuteImpl()
{
CodeBlockKey next_block_key;
@ -157,7 +158,7 @@ void Execute()
}
else
{
InterpretCachedBlock(*block);
InterpretCachedBlock<pgxp_mode>(*block);
}
if (g_state.pending_ticks >= g_state.downcount)
@ -212,6 +213,21 @@ void Execute()
g_state.regs.npc = g_state.regs.pc;
}
void Execute()
{
if (g_settings.gpu_pgxp_enable)
{
if (g_settings.gpu_pgxp_cpu)
ExecuteImpl<PGXPMode::CPU>();
else
ExecuteImpl<PGXPMode::Memory>();
}
else
{
ExecuteImpl<PGXPMode::Disabled>();
}
}
#ifdef WITH_RECOMPILER
void ExecuteRecompiler()