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

Fei Yang fyang at openjdk.org
Fri Sep 15 10:17:38 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!

Try this test: `make test TEST="test/hotspot/jtreg/gc/shenandoah/compiler/TestReferenceCAS.java"`
It fails with this change:

java.lang.RuntimeException: a (foo) != b (bar): success compareAndSet Object value
        at TestReferenceCAS.assertEquals(TestReferenceCAS.java:93)
        at TestReferenceCAS.testAccess(TestReferenceCAS.java:115)
        at TestReferenceCAS.main(TestReferenceCAS.java:100)
        at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
        at java.base/java.lang.reflect.Method.invoke(Method.java:580)
        at com.sun.javatest.regtest.agent.MainWrapper$MainTask.run(MainWrapper.java:138)
        at java.base/java.lang.Thread.run(Thread.java:1570)

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

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


More information about the hotspot-runtime-dev mailing list