-
Enhancement
-
Resolution: Rejected
-
P4
-
22
-
aarch64
-
linux
In function `MacroAssembler::cmpxchgw` and `MacroAssembler::cmpxchgptr`, when turn on `UseLSE`, there is a `dmb`
instruction generated after `casal` instruction.
The `casal` means a CAS operate with both load-acquire and store-release semantics.
It looks like the subsequent dmb is redundant.
The code is bellow:
```
if (UseLSE) {
mov(tmp, oldv);
casal(Assembler::xword, oldv, newv, addr);
cmp(tmp, oldv);
br(Assembler::EQ, succeed);
membar(AnyAny);
}
```
instruction generated after `casal` instruction.
The `casal` means a CAS operate with both load-acquire and store-release semantics.
It looks like the subsequent dmb is redundant.
The code is bellow:
```
if (UseLSE) {
mov(tmp, oldv);
casal(Assembler::xword, oldv, newv, addr);
cmp(tmp, oldv);
br(Assembler::EQ, succeed);
membar(AnyAny);
}
```
- links to
-
Review openjdk/jdk/15856