RFR: 8316186: RISC-V: Remove PlatformCmpxchg<4>

Robbin Ehn rehn at openjdk.org
Tue Sep 19 07:47:41 UTC 2023


On Wed, 13 Sep 2023 12:25:41 GMT, Robbin Ehn <rehn at openjdk.org> wrote:

> Hi, please consider.
> 
> I don't know the history behind the Cmpxhg<4>, but it is not needed anymore.
> Using compiler as in 8 byte case is just fine.
> 
> Passes hotspot-tier (qemu, vf2 still running), some manual extra testing via gtest, looked at compiler: output, e.g. https://godbolt.org/z/a31Gdqn8q
> 
> If you know the history please share, and if you have a reason why we should keep it please speak up!

This look like the bug you are hitting:
https://github.com/openjdk/jdk/blob/4421951d8f1c6fb16255851a803252fe96a453e5/src/hotspot/cpu/riscv/gc/shenandoah/shenandoahBarrierSetAssembler_riscv.cpp#L499

> PS: I can reproduce the test failure with GCC version 10 and 11. But it does not trigger with GCC 12. (GCC 13 is not shipped with the distro) Note that I am using openjdk release build. It won't trigger if I use openjdk slowdebug build built with GCC 11.

I can't reproduce with gcc 11.4.0-1ubuntu1~23.04 (testing with fastdebug).
Trying with another gcc....

Can you add 'assert' code above and check hs_err which case this is?

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

PR Comment: https://git.openjdk.org/jdk/pull/15715#issuecomment-1724993142


More information about the hotspot-runtime-dev mailing list