RFR: 8315841: RISC-V: Check for hardware TSO support [v5]
Vladimir Kempik
vkempik at openjdk.org
Thu Sep 7 13:14:27 UTC 2023
On Thu, 7 Sep 2023 13:04:05 GMT, Ludovic Henry <luhenry at openjdk.org> wrote:
>> With the Ztso extension [1], some hardware will support TSO on RISC-V. That allows us to reduce the generation of memory fences, given the stronger memory model compared to RVWMO.
>>
>> [1] https://github.com/riscv/riscv-isa-manual/blob/6dcbc6da9ada01f0f57da83cda6059bdec57619f/src/ztso-st-ext.adoc#L1
>
> Ludovic Henry has updated the pull request incrementally with two additional commits since the last revision:
>
> - fixup! 8315841: RISC-V: Check for hardware TSO support
> - fixup! 8315841: RISC-V: Check for hardware TSO support
Maybe this way:
still needs a good comment for cases when we don't generate fence
if (UseZtso) {
if ((pred_succ_to_membar_mask(predecessor, successor) & StoreLoad) == 0) {
return;
}
// always generate fence for RVWMO
Assembler::fence(predecessor, successor);
-------------
PR Comment: https://git.openjdk.org/jdk/pull/15613#issuecomment-1710123100
More information about the hotspot-dev
mailing list