Merge pull request #1879 from magumagu/idle-exception-check

For idle loops, perform an exception check before CoreTiming::Advance.
This commit is contained in:
skidau 2015-01-24 12:28:44 +11:00
commit f1a4b98d36
7 changed files with 4 additions and 17 deletions

View File

@ -479,8 +479,6 @@ void Idle()
idledCycles += DowncountToCycles(PowerPC::ppcState.downcount);
PowerPC::ppcState.downcount = 0;
Advance();
}
std::string GetScheduledEventsSummary()

View File

@ -134,7 +134,7 @@ void Jit64::lXXx(UGeckoInstruction inst)
BitSet32 registersInUse = CallerSavedRegistersInUse();
ABI_PushRegistersAndAdjustStack(registersInUse, 0);
ABI_CallFunctionC((void *)&PowerPC::OnIdle, PowerPC::ppcState.gpr[a] + (s32)(s16)inst.SIMM_16);
ABI_CallFunction((void *)&PowerPC::OnIdle);
ABI_PopRegistersAndAdjustStack(registersInUse, 0);

View File

@ -2088,7 +2088,7 @@ static void DoWriteCode(IRBuilder* ibuild, JitIL* Jit, u32 exitAddress)
FixupBranch noidle = Jit->J_CC(CC_NZ);
RI.Jit->Cleanup(); // is it needed?
Jit->ABI_CallFunction((void *)&PowerPC::OnIdleIL);
Jit->ABI_CallFunction((void *)&PowerPC::OnIdle);
Jit->MOV(32, PPCSTATE(pc), Imm32(ibuild->GetImmValue( getOp2(I) )));
Jit->WriteExceptionExit();

View File

@ -464,7 +464,6 @@ void JitArm::lXX(UGeckoInstruction inst)
rA = gpr.GetReg();
MOVI2R(rA, (u32)&PowerPC::OnIdle);
MOVI2R(R0, PowerPC::ppcState.gpr[a] + (s32)(s16)inst.SIMM_16);
BL(rA);
gpr.Unlock(rA);

View File

@ -398,7 +398,6 @@ void JitArm64::lXX(UGeckoInstruction inst)
ARM64Reg XA = EncodeRegTo64(WA);
MOVI2R(XA, (u64)&PowerPC::OnIdle);
MOVI2R(W0, PowerPC::ppcState.gpr[a] + (s32)(s16)inst.SIMM_16);
BLR(XA);
gpr.Unlock(WA);

View File

@ -510,15 +510,7 @@ void CheckBreakPoints()
}
}
void OnIdle(u32 _uThreadAddr)
{
u32 nextThread = Memory::Read_U32(_uThreadAddr);
//do idle skipping
if (nextThread == 0)
CoreTiming::Idle();
}
void OnIdleIL()
void OnIdle()
{
CoreTiming::Idle();
}

View File

@ -153,8 +153,7 @@ volatile CPUState *GetStatePtr(); // this oddity is here instead of an extern d
u32 CompactCR();
void ExpandCR(u32 cr);
void OnIdle(u32 _uThreadAddr);
void OnIdleIL();
void OnIdle();
void UpdatePerformanceMonitor(u32 cycles, u32 num_load_stores, u32 num_fp_inst);