PPCAnalyst: More strict a_flags checks in CanSwapAdjacentOps

If for instance instruction a sets OE and instruction b
reads it, we shouldn't permit reordering.
This commit is contained in:
JosJuice 2021-10-16 15:56:50 +02:00
parent 8e9609df6e
commit da63cee711

View File

@ -222,7 +222,7 @@ bool PPCAnalyzer::CanSwapAdjacentOps(const CodeOp& a, const CodeOp& b) const
// [1] https://bugs.dolphin-emu.org/issues/5864#note-7
if (a.canCauseException || b.canCauseException)
return false;
if (a_flags & FL_ENDBLOCK)
if (a_flags & (FL_ENDBLOCK | FL_TIMER | FL_EVIL | FL_SET_OE))
return false;
if (b_flags & (FL_SET_CRx | FL_ENDBLOCK | FL_TIMER | FL_EVIL | FL_SET_OE))
return false;