RFR: 8325821: [REDO] use "dmb.ishst+dmb.ishld" for release barrier [v7]

Andrew Haley aph at openjdk.org
Fri May 10 08:05:08 UTC 2024


On Tue, 16 Apr 2024 14:06:14 GMT, Andrew Haley <aph at openjdk.org> wrote:

>> kuaiwei has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Fix arm build error
>
> Argh, I found it. It happens because C2 calls `masm->offset()` from `PhaseOutput::fill_buffer()` after every node is emitted. So that trick isn't going to work.
> 
> It was worth a try, but given that C2 expects offset() to be correct after every node, I think we're stuck. Maybe the last idea you had is the best possible without C2 tinkering.

> @theRealAph Could you help review this PR? Thanks.

I think we should go with your original simple patch for now. Trying to make the Assembler do the optimal thing has not turned out to be very easy, and I'm worried it's too much of a maintenance burden. Simply emitting `dmb st; dmb ld` for releasing stores is enough for now. 

Thank you for trying to make this work. I still have in my mind that there might be an easy way to do it, but it's looking unlikely.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/18467#issuecomment-2104134470


More information about the hotspot-dev mailing list