JIT: reorder blr comparisons
This should allow macro-op fusion in blr instructions.
This commit is contained in:
parent
7388c62439
commit
5b5e462200
|
@ -414,10 +414,10 @@ void Jit64::WriteBLRExit()
|
|||
bool disturbed = Cleanup();
|
||||
if (disturbed)
|
||||
MOV(32, R(RSCRATCH), PPCSTATE(pc));
|
||||
MOV(32, R(RSCRATCH2), Imm32(js.downcountAmount));
|
||||
CMP(64, R(RSCRATCH), MDisp(RSP, 8));
|
||||
MOV(32, R(RSCRATCH), Imm32(js.downcountAmount));
|
||||
J_CC(CC_NE, asm_routines.dispatcherMispredictedBLR);
|
||||
SUB(32, PPCSTATE(downcount), R(RSCRATCH));
|
||||
SUB(32, PPCSTATE(downcount), R(RSCRATCH2));
|
||||
RET();
|
||||
}
|
||||
|
||||
|
|
|
@ -52,14 +52,14 @@ void Jit64AsmRoutineManager::Generate()
|
|||
|
||||
#if 0 // debug mispredicts
|
||||
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));
|
||||
ABI_PopRegistersAndAdjustStack(1 << RSCRATCH, 0);
|
||||
ABI_PopRegistersAndAdjustStack(1 << RSCRATCH2, 0);
|
||||
#endif
|
||||
|
||||
ResetStack();
|
||||
|
||||
SUB(32, PPCSTATE(downcount), R(RSCRATCH));
|
||||
SUB(32, PPCSTATE(downcount), R(RSCRATCH2));
|
||||
|
||||
dispatcher = GetCodePtr();
|
||||
// The result of slice decrementation should be in flags if somebody jumped here
|
||||
|
|
Loading…
Reference in New Issue