Fix idle skipping.
It incorrectly continued to test EAX after it was changed to load directly to the assigned register. Also switch from a flush to ABI_PushRegistersAndAdjustStack, to avoid needless flushing in the no-idle case.
This commit is contained in:
parent
3679f9ba60
commit
a51eb5fd19
|
@ -122,15 +122,17 @@ void Jit64::lXXx(UGeckoInstruction inst)
|
||||||
gpr.BindToRegister(d, false, true);
|
gpr.BindToRegister(d, false, true);
|
||||||
SafeLoadToReg(gpr.RX(d), gpr.R(a), accessSize, offset, RegistersInUse(), signExtend);
|
SafeLoadToReg(gpr.RX(d), gpr.R(a), accessSize, offset, RegistersInUse(), signExtend);
|
||||||
|
|
||||||
gpr.Flush(FLUSH_ALL);
|
|
||||||
fpr.Flush(FLUSH_ALL);
|
|
||||||
|
|
||||||
// if it's still 0, we can wait until the next event
|
// if it's still 0, we can wait until the next event
|
||||||
TEST(32, R(EAX), R(EAX));
|
TEST(32, gpr.R(d), gpr.R(d));
|
||||||
FixupBranch noIdle = J_CC(CC_NZ);
|
FixupBranch noIdle = J_CC(CC_NZ);
|
||||||
|
|
||||||
|
u32 registersInUse = RegistersInUse();
|
||||||
|
ABI_PushRegistersAndAdjustStack(registersInUse, false);
|
||||||
|
|
||||||
ABI_CallFunctionC((void *)&PowerPC::OnIdle, PowerPC::ppcState.gpr[a] + (s32)(s16)inst.SIMM_16);
|
ABI_CallFunctionC((void *)&PowerPC::OnIdle, PowerPC::ppcState.gpr[a] + (s32)(s16)inst.SIMM_16);
|
||||||
|
|
||||||
|
ABI_PopRegistersAndAdjustStack(registersInUse, false);
|
||||||
|
|
||||||
// ! we must continue executing of the loop after exception handling, maybe there is still 0 in r0
|
// ! we must continue executing of the loop after exception handling, maybe there is still 0 in r0
|
||||||
//MOV(32, M(&PowerPC::ppcState.pc), Imm32(js.compilerPC));
|
//MOV(32, M(&PowerPC::ppcState.pc), Imm32(js.compilerPC));
|
||||||
WriteExceptionExit();
|
WriteExceptionExit();
|
||||||
|
|
Loading…
Reference in New Issue