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

RISC-V: Remove dependency on libatomic by adding cmpxchg 1b

XMLWordPrintable

    • b18
    • riscv

        Rv being the odd duck is a bit problematic.
        It's also makes atomic operation depending on latomic not inlinable, instead it's call to the library.
        This applies to atomic operation "not supported by hardware". I.e. CAS 1 byte on rv64.

        gcc have admitted this problem by allowing the compiler to inline these instead forcing the application to add this
        dependency (since 13.2).
        llvm have always inline these,

        Currently hotspot is only using Atomic::cmpxchg 1 byte, all others are either not used or supported by hardware, hence gcc inlines them.

        By adding this single case if compiler don't support inlining it we can remove thsi dependency.

              rehn Robbin Ehn
              rehn Robbin Ehn
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: