summaryrefslogtreecommitdiff
path: root/Source
diff options
context:
space:
mode:
authorJosJuice <josjuice@gmail.com>2021-10-16 15:56:50 +0200
committerJosJuice <josjuice@gmail.com>2023-11-28 18:59:34 +0100
commitda63cee711de321d4f5eab1bb4f0e58493202398 (patch)
tree7be28f8c7f3c9efc2e393469db555e09abae7f1a /Source
parent8e9609df6e031568537550d9d193aaa650de3eed (diff)
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.
Diffstat (limited to 'Source')
-rw-r--r--Source/Core/Core/PowerPC/PPCAnalyst.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/Core/Core/PowerPC/PPCAnalyst.cpp b/Source/Core/Core/PowerPC/PPCAnalyst.cpp
index 2dd988d6c2..1ea5f7dd3e 100644
--- a/Source/Core/Core/PowerPC/PPCAnalyst.cpp
+++ b/Source/Core/Core/PowerPC/PPCAnalyst.cpp
@@ -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;