[jdk17u-dev] Integrated: 8316645: RISC-V: Remove dependency on libatomic by adding cmpxchg 1b

Gui Cao gcao at openjdk.org
Tue Nov 21 02:25:13 UTC 2023


On Sat, 18 Nov 2023 10:15:59 GMT, Gui Cao <gcao at openjdk.org> wrote:

> Hi, I would like to backport this riscv-specific change to remove dependency on latomic libraries.
> latomic is used for non native atomic operation which causes problems with extra dependency. This have been fixed in recent gcc, so latomic is no longer needed. this backport will work for older gcc versions as well,  it uses assembly code.
> The backport is not clean because jdk17u-dev has no [JDK-8307806](https://bugs.openjdk.org/browse/JDK-8307806), and the original patch modified a test case(test/hotspot/gtest/runtime/test_atomic.cpp), but there is no corresponding test case in the jdk17u-dev.
> 
> ### Testing:
> qemu 8.1.50 with UseRVV:
> - [x] Tier1 tests (release)
> - [x] Tier2 tests (release)
> - [x] Tier3 tests (release)

This pull request has now been integrated.

Changeset: db83123c
Author:    Gui Cao <gcao at openjdk.org>
Committer: Fei Yang <fyang at openjdk.org>
URL:       https://git.openjdk.org/jdk17u-dev/commit/db83123c5cc054cee5663201ead92410e6487d81
Stats:     79 lines in 2 files changed: 73 ins; 6 del; 0 mod

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

Reviewed-by: luhenry, fyang
Backport-of: fb055e7e5300958b2a6a290aa6783e8ede929d9a

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

PR: https://git.openjdk.org/jdk17u-dev/pull/1970


More information about the jdk-updates-dev mailing list