RFR: 8330242: RISC-V: Simplify and remove CORRECT_COMPILER_ATOMIC_SUPPORT in atomic_linux_riscv.hpp

Gui Cao gcao at openjdk.org
Wed Apr 17 01:20:43 UTC 2024


On Mon, 15 Apr 2024 08:43:03 GMT, Fei Yang <fyang at openjdk.org> wrote:

>> Previously, we fixed JDK-8326936 with a workaround for one GCC bug [1]. We define a new `CORRECT_COMPILER_ATOMIC_SUPPORT` macro when building with GCC >= 14. Now this bug has been fixed in gcc trunk and has been backported to GCC-13 branch. The `__atomic_compare_exchange` atomic operation will be usable for the next GCC-13.3 release. So we should relax the condition and require GCC > 13.2. This will also help remove `CORRECT_COMPILER_ATOMIC_SUPPORT` macro and reuse a single `FULL_COMPILER_ATOMIC_SUPPORT` macro.
>> 
>> [1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114130
>> 
>> ### Testing
>> 
>> - [x] The affected jtreg test cases all pass with jdk release built with latest gcc-13 development branch.
>
> Looks fine to me. Thanks for the cleanup.

@RealFYang @robehn : Thanks for the review.

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

PR Comment: https://git.openjdk.org/jdk/pull/18780#issuecomment-2060166274


More information about the hotspot-runtime-dev mailing list