mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-07 08:39:00 +00:00
JIT: reorder blr comparisons
This should allow macro-op fusion in blr instructions.
This commit is contained in:
parent
7388c62439
commit
5b5e462200
2 changed files with 5 additions and 5 deletions
|
@ -414,10 +414,10 @@ void Jit64::WriteBLRExit()
|
||||||
bool disturbed = Cleanup();
|
bool disturbed = Cleanup();
|
||||||
if (disturbed)
|
if (disturbed)
|
||||||
MOV(32, R(RSCRATCH), PPCSTATE(pc));
|
MOV(32, R(RSCRATCH), PPCSTATE(pc));
|
||||||
|
MOV(32, R(RSCRATCH2), Imm32(js.downcountAmount));
|
||||||
CMP(64, R(RSCRATCH), MDisp(RSP, 8));
|
CMP(64, R(RSCRATCH), MDisp(RSP, 8));
|
||||||
MOV(32, R(RSCRATCH), Imm32(js.downcountAmount));
|
|
||||||
J_CC(CC_NE, asm_routines.dispatcherMispredictedBLR);
|
J_CC(CC_NE, asm_routines.dispatcherMispredictedBLR);
|
||||||
SUB(32, PPCSTATE(downcount), R(RSCRATCH));
|
SUB(32, PPCSTATE(downcount), R(RSCRATCH2));
|
||||||
RET();
|
RET();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -52,14 +52,14 @@ void Jit64AsmRoutineManager::Generate()
|
||||||
|
|
||||||
#if 0 // debug mispredicts
|
#if 0 // debug mispredicts
|
||||||
MOV(32, R(ABI_PARAM1), MDisp(RSP, 8)); // guessed_pc
|
MOV(32, R(ABI_PARAM1), MDisp(RSP, 8)); // guessed_pc
|
||||||
ABI_PushRegistersAndAdjustStack(1 << RSCRATCH, 0);
|
ABI_PushRegistersAndAdjustStack(1 << RSCRATCH2, 0);
|
||||||
CALL(reinterpret_cast<void *>(&ReportMispredict));
|
CALL(reinterpret_cast<void *>(&ReportMispredict));
|
||||||
ABI_PopRegistersAndAdjustStack(1 << RSCRATCH, 0);
|
ABI_PopRegistersAndAdjustStack(1 << RSCRATCH2, 0);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
ResetStack();
|
ResetStack();
|
||||||
|
|
||||||
SUB(32, PPCSTATE(downcount), R(RSCRATCH));
|
SUB(32, PPCSTATE(downcount), R(RSCRATCH2));
|
||||||
|
|
||||||
dispatcher = GetCodePtr();
|
dispatcher = GetCodePtr();
|
||||||
// The result of slice decrementation should be in flags if somebody jumped here
|
// The result of slice decrementation should be in flags if somebody jumped here
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue