Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8330242

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

XMLWordPrintable

    • b19
    • riscv
    • linux

        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

              gcao Gui Cao
              gcao Gui Cao
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: