DSP LLE Jit, joined work with XK and skidu.

VERY EXPERIMENTAL DON'T EXPECT HIGH PERFORMANCE!.



git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5288 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
nakeee
2010-04-07 15:04:45 +00:00
parent 1b96bef8e1
commit 499936561a
22 changed files with 1305 additions and 324 deletions

View File

@ -103,19 +103,23 @@ void Run()
int checkInterrupt = 0;
gdsp_running = true;
while (!(g_dsp.cr & CR_HALT) && gdsp_running)
{
// Automatically let the other threads work if we're idle skipping
if(DSPAnalyzer::code_flags[g_dsp.pc] & DSPAnalyzer::CODE_IDLE_SKIP)
Common::YieldCPU();
Step();
// Turns out the less you check for external interrupts, the more
// sound you hear, and it becomes slower
checkInterrupt++;
if(checkInterrupt == 500) { // <-- A completely arbitrary number. TODO: tweak
DSPCore_CheckExternalInterrupt();
checkInterrupt = 0;
{
if(jit)
jit->RunBlock(1);
else {
// Automatically let the other threads work if we're idle skipping
if(DSPAnalyzer::code_flags[g_dsp.pc] & DSPAnalyzer::CODE_IDLE_SKIP)
Common::YieldCPU();
Step();
// Turns out the less you check for external interrupts, the more
// sound you hear, and it becomes slower
checkInterrupt++;
if(checkInterrupt == 500) { // <-- Arbitrary number. TODO: tweak
DSPCore_CheckExternalInterrupt();
checkInterrupt = 0;
}
}
}
gdsp_running = false;
@ -185,7 +189,8 @@ int RunCyclesDebug(int cycles)
// Used by non-thread mode. Meant to be efficient.
int RunCycles(int cycles)
{
// First, let's run a few cycles with no idle skipping so that things can progress a bit.
// First, let's run a few cycles with no idle skipping so that things can
// progress a bit.
for (int i = 0; i < 8; i++)
{
if (g_dsp.cr & CR_HALT)