Idle skipping in DC added (speedup). "Idle skipping" option in menu and ini

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@544 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
memberTwo.mb2
2008-09-16 20:02:59 +00:00
parent 9323ec5df6
commit e6a12b553b
10 changed files with 36 additions and 8 deletions

View File

@ -32,6 +32,7 @@ void SCoreStartupParameter::LoadDefaults()
bEnableDebugging = false;
bUseJIT = false;
bUseDualCore = false;
bSkipIdle = false;
bRunCompareServer = false;
bLockThreads = true;
bWii = false;

View File

@ -37,6 +37,7 @@ struct SCoreStartupParameter
bool bEnableDebugging;
bool bUseJIT;
bool bUseDualCore;
bool bSkipIdle;
bool bNTSC;
bool bHLEBios;
bool bUseFastMem;

View File

@ -80,20 +80,27 @@ namespace Jit64
// TODO(ector): Make it dynamically enable/disable idle skipping where appropriate
// Will give nice boost to dual core mode
// (mb2): I agree,
// IMHO those Idles should be always skipped and replaced by a more controlable "native" Idle methode
// ... maybe the throttle one already do that :p
// if (CommandProcessor::AllowIdleSkipping() && PixelEngine::AllowIdleSkipping())
if (!Core::GetStartupParameter().bUseDualCore &&
if (Core::GetStartupParameter().bSkipIdle &&
inst.OPCD == 32 &&
(inst.hex & 0xFFFF0000) == 0x800D0000 &&
Memory::ReadUnchecked_U32(js.compilerPC + 4) == 0x28000000 &&
Memory::ReadUnchecked_U32(js.compilerPC + 8) == 0x4182fff8)
{
gpr.Flush(FLUSH_ALL);
fpr.Flush(FLUSH_ALL);
ABI_CallFunctionC((void *)&PowerPC::OnIdle, PowerPC::ppcState.gpr[a] + (s32)(s16)inst.SIMM_16);
MOV(32, M(&PowerPC::ppcState.pc), Imm32(js.compilerPC + 12));
JMP(Asm::testExceptions, true);
js.compilerPC += 8;
return;
gpr.Flush(FLUSH_ALL);
fpr.Flush(FLUSH_ALL);
if (Core::GetStartupParameter().bUseDualCore)
CALL(&PowerPC::OnIdleDC);
else
ABI_CallFunctionC((void *)&PowerPC::OnIdle, PowerPC::ppcState.gpr[a] + (s32)(s16)inst.SIMM_16);
MOV(32, M(&PowerPC::ppcState.pc), Imm32(js.compilerPC + 12));
JMP(Asm::testExceptions, true);
js.compilerPC += 8;
return;
}
s32 offset = (s32)(s16)inst.SIMM_16;

View File

@ -290,5 +290,10 @@ namespace PowerPC
CoreTiming::Idle();
}
}
//DualCore OnIdle
void OnIdleDC(void)
{
CoreTiming::Idle();
}
}

View File

@ -92,6 +92,7 @@ namespace PowerPC
void Stop();
void OnIdle(u32 _uThreadAddr);
void OnIdleDC(void);
}
// Special registers