backend/arm64: Fix exclusive writes
This commit is contained in:
parent
bd570e093c
commit
7660da4909
2 changed files with 2 additions and 0 deletions
|
@ -73,6 +73,7 @@ static void EmitExclusiveWriteMemory(oaknut::CodeGenerator& code, EmitContext& c
|
||||||
if (ordered) {
|
if (ordered) {
|
||||||
code.DMB(oaknut::BarrierOp::ISH);
|
code.DMB(oaknut::BarrierOp::ISH);
|
||||||
}
|
}
|
||||||
|
code.MOV(W0, 1);
|
||||||
code.LDRB(Wscratch0, Xstate, offsetof(A32JitState, exclusive_state));
|
code.LDRB(Wscratch0, Xstate, offsetof(A32JitState, exclusive_state));
|
||||||
code.CBZ(Wscratch0, end);
|
code.CBZ(Wscratch0, end);
|
||||||
code.STRB(WZR, Xstate, offsetof(A32JitState, exclusive_state));
|
code.STRB(WZR, Xstate, offsetof(A32JitState, exclusive_state));
|
||||||
|
|
|
@ -101,6 +101,7 @@ static void EmitExclusiveWriteMemory(oaknut::CodeGenerator& code, EmitContext& c
|
||||||
if (ordered) {
|
if (ordered) {
|
||||||
code.DMB(oaknut::BarrierOp::ISH);
|
code.DMB(oaknut::BarrierOp::ISH);
|
||||||
}
|
}
|
||||||
|
code.MOV(W0, 1);
|
||||||
code.LDRB(Wscratch0, Xstate, offsetof(A64JitState, exclusive_state));
|
code.LDRB(Wscratch0, Xstate, offsetof(A64JitState, exclusive_state));
|
||||||
code.CBZ(Wscratch0, end);
|
code.CBZ(Wscratch0, end);
|
||||||
code.STRB(WZR, Xstate, offsetof(A64JitState, exclusive_state));
|
code.STRB(WZR, Xstate, offsetof(A64JitState, exclusive_state));
|
||||||
|
|
Loading…
Reference in a new issue