diff --git a/src/frontend/A64/translate/impl/load_store_exclusive.cpp b/src/frontend/A64/translate/impl/load_store_exclusive.cpp index bab0fb37..553a2e44 100644 --- a/src/frontend/A64/translate/impl/load_store_exclusive.cpp +++ b/src/frontend/A64/translate/impl/load_store_exclusive.cpp @@ -26,7 +26,10 @@ static bool ExclusiveSharedDecodeAndOperation(TranslatorVisitor& tv, IREmitter& if (memop == MemOp::LOAD && pair && Rt == *Rt2) { return tv.UnpredictableInstruction(); } else if (memop == MemOp::STORE && (*Rs == Rt || (pair && *Rs == *Rt2))) { - return tv.UnpredictableInstruction(); + if (!tv.options.define_unpredictable_behaviour) { + return tv.UnpredictableInstruction(); + } + // UNPREDICTABLE: The Constraint_NONE case is executed. } else if (memop == MemOp::STORE && *Rs == Rn && Rn != Reg::R31) { return tv.UnpredictableInstruction(); }