[riscv-port-jdk11u:riscv-port] RFR: 8316645: RISC-V: Remove dependency on libatomic by adding cmpxchg 1b

Robbin Ehn rehn at openjdk.org
Mon Mar 11 07:28:10 UTC 2024


On Mon, 11 Mar 2024 01:48:54 GMT, Fei Yang <fyang at openjdk.org> wrote:

>> For CI builds it helps to remove this.
>> [8317335](https://bugs.openjdk.org/browse/JDK-8317335) is not needed as there is no gtest for atomic in 11.
>
> src/hotspot/os_cpu/linux_riscv/atomic_linux_riscv.hpp line 75:
> 
>> 73:                                                 T compare_value,
>> 74:                                                 T exchange_value,
>> 75:                                                 atomic_memory_order order) const {
> 
> I see the parameter order is not consistent with the one in jdk11u:
> `T Atomic::PlatformCmpxchg<byte_size>::operator()`.
> So this might need more adaptations, otherwise I guess it won't build.
> Also the original commit adds one `#undef FULL_COMPILER_ATOMIC_SUPPORT` at the end of the file, which is missing for this backport.

It did build and run... I'll fix thanks.

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

PR Review Comment: https://git.openjdk.org/riscv-port-jdk11u/pull/10#discussion_r1519249001


More information about the riscv-port-dev mailing list