backend/arm64: Fix exclusive writes

This commit is contained in:
Merry 2022-12-05 21:11:51 +00:00
parent bd570e093c
commit 7660da4909
2 changed files with 2 additions and 0 deletions

View file

@ -73,6 +73,7 @@ static void EmitExclusiveWriteMemory(oaknut::CodeGenerator& code, EmitContext& c
if (ordered) {
code.DMB(oaknut::BarrierOp::ISH);
}
code.MOV(W0, 1);
code.LDRB(Wscratch0, Xstate, offsetof(A32JitState, exclusive_state));
code.CBZ(Wscratch0, end);
code.STRB(WZR, Xstate, offsetof(A32JitState, exclusive_state));

View file

@ -101,6 +101,7 @@ static void EmitExclusiveWriteMemory(oaknut::CodeGenerator& code, EmitContext& c
if (ordered) {
code.DMB(oaknut::BarrierOp::ISH);
}
code.MOV(W0, 1);
code.LDRB(Wscratch0, Xstate, offsetof(A64JitState, exclusive_state));
code.CBZ(Wscratch0, end);
code.STRB(WZR, Xstate, offsetof(A64JitState, exclusive_state));