Merge pull request #3806 from degasus/idle

ConfigManager: Drop SkipIdle option.
This commit is contained in:
shuffle2 2016-10-03 23:59:38 -07:00 committed by GitHub
commit ab01dec178
18 changed files with 13 additions and 71 deletions

View file

@ -22,7 +22,7 @@ void Interpreter::bx(UGeckoInstruction _inst)
m_EndBlock = true;
if (NPC == PC && SConfig::GetInstance().bSkipIdle)
if (NPC == PC)
{
CoreTiming::Idle();
}
@ -58,7 +58,7 @@ void Interpreter::bcx(UGeckoInstruction _inst)
// lwz r0, XXXX(r13)
// cmpXwi r0,0
// beq -8
if (NPC == PC - 8 && _inst.hex == 0x4182fff8 /* beq */ && SConfig::GetInstance().bSkipIdle)
if (NPC == PC - 8 && _inst.hex == 0x4182fff8 /* beq */)
{
if (PowerPC::HostRead_U32(PC - 8) >> 16 == 0x800D /* lwz */)
{

View file

@ -117,26 +117,12 @@ void Jit64::lXXx(UGeckoInstruction inst)
signExtend = true;
}
// 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 always be skipped and replaced by a more controllable "native" Idle
// methode
// ... maybe the throttle one already do that :p
// TODO: We shouldn't use a debug read here. It should be possible to get
// the following instructions out of the JIT state.
if (SConfig::GetInstance().bSkipIdle && CPU::GetState() != CPU::CPU_STEPPING && inst.OPCD == 32 &&
MergeAllowedNextInstructions(2) && (inst.hex & 0xFFFF0000) == 0x800D0000 &&
if (CPU::GetState() != CPU::CPU_STEPPING && inst.OPCD == 32 && MergeAllowedNextInstructions(2) &&
(inst.hex & 0xFFFF0000) == 0x800D0000 &&
(js.op[1].inst.hex == 0x28000000 ||
(SConfig::GetInstance().bWii && js.op[1].inst.hex == 0x2C000000)) &&
js.op[2].inst.hex == 0x4182fff8)
{
// TODO(LinesPrower):
// - Rewrite this!
// It seems to be ugly and inefficient, but I don't know JIT stuff enough to make it right
// It only demonstrates the idea
// do our job at first
s32 offset = (s32)(s16)inst.SIMM_16;
gpr.BindToRegister(a, true, false);
gpr.BindToRegister(d, false, true);

View file

@ -430,7 +430,7 @@ void JitArm64::lXX(UGeckoInstruction inst)
SafeLoadToReg(d, update ? a : (a ? a : -1), offsetReg, flags, offset, update);
// LWZ idle skipping
if (SConfig::GetInstance().bSkipIdle && inst.OPCD == 32 && MergeAllowedNextInstructions(2) &&
if (inst.OPCD == 32 && MergeAllowedNextInstructions(2) &&
(inst.hex & 0xFFFF0000) == 0x800D0000 && // lwz r0, XXXX(r13)
(js.op[1].inst.hex == 0x28000000 ||
(SConfig::GetInstance().bWii && js.op[1].inst.hex == 0x2C000000)) && // cmpXwi r0,0

View file

@ -145,7 +145,7 @@ void JitILBase::bcx(UGeckoInstruction inst)
// If idle skipping is enabled, then this branch will only be reached when the branch is not
// taken.
// TODO: We shouldn't use debug reads here.
if (SConfig::GetInstance().bSkipIdle && inst.hex == 0x4182fff8 &&
if (inst.hex == 0x4182fff8 &&
(PowerPC::HostRead_U32(js.compilerPC - 8) & 0xFFFF0000) == 0x800D0000 &&
(PowerPC::HostRead_U32(js.compilerPC - 4) == 0x28000000 ||
(SConfig::GetInstance().bWii && PowerPC::HostRead_U32(js.compilerPC - 4) == 0x2C000000)))

View file

@ -57,8 +57,7 @@ void JitILBase::lXz(UGeckoInstruction inst)
// TODO: This really should be done somewhere else. Either lower in the IR
// or higher in PPCAnalyst
// TODO: We shouldn't use debug reads here.
if (SConfig::GetInstance().bSkipIdle && CPU::GetState() != CPU::CPU_STEPPING &&
inst.OPCD == 32 && // Lwx
if (CPU::GetState() != CPU::CPU_STEPPING && inst.OPCD == 32 && // Lwx
(inst.hex & 0xFFFF0000) == 0x800D0000 &&
(PowerPC::HostRead_U32(js.compilerPC + 4) == 0x28000000 ||
(SConfig::GetInstance().bWii && PowerPC::HostRead_U32(js.compilerPC + 4) == 0x2C000000)) &&