From 090b7128c6e750637a63bbbbd46c94b54fffd735 Mon Sep 17 00:00:00 2001 From: Merry Date: Sun, 13 Mar 2022 01:43:38 +0000 Subject: [PATCH] InstEmitMemoryEx: Barrier after write on ordered store --- ARMeilleure/Instructions/InstEmitMemoryEx.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ARMeilleure/Instructions/InstEmitMemoryEx.cs b/ARMeilleure/Instructions/InstEmitMemoryEx.cs index 88b9d2f0c..af6adfb93 100644 --- a/ARMeilleure/Instructions/InstEmitMemoryEx.cs +++ b/ARMeilleure/Instructions/InstEmitMemoryEx.cs @@ -130,11 +130,6 @@ namespace ARMeilleure.Instructions bool ordered = (accType & AccessType.Ordered) != 0; bool exclusive = (accType & AccessType.Exclusive) != 0; - if (ordered) - { - EmitBarrier(context); - } - Operand address = context.Copy(GetIntOrSP(context, op.Rn)); Operand t = GetIntOrZR(context, op.Rt); @@ -163,6 +158,11 @@ namespace ARMeilleure.Instructions { EmitStoreExclusive(context, address, t, exclusive, op.Size, op.Rs, a32: false); } + + if (ordered) + { + EmitBarrier(context); + } } private static void EmitBarrier(ArmEmitterContext context)