RFR: 8261649: AArch64: Optimize LSE atomics in C++ code

Andrew Dinn adinn at openjdk.java.net
Wed Feb 17 17:54:40 UTC 2021


On Wed, 17 Feb 2021 17:14:46 GMT, Andrew Haley <aph at openjdk.org> wrote:

> 8261649: AArch64: Optimize LSE atomics in C++ code

src/hotspot/cpu/aarch64/stubGenerator_aarch64.cpp line 5651:

> 5649:     __ mov(prev, compare_val);
> 5650:     __ lse_cas(prev, exchange_val, ptr, size, acquire, release, /*not_pair*/true);
> 5651:     if (acquire && release) {

These two flags are only ever passed as true,true or false,false. Does any other combination make sense? If not then should you not be using a single flag? or at least asserting (pro tem) that they are both equal?

src/hotspot/os_cpu/linux_aarch64/atomic_linux_aarch64.S line 75:

> 73:         .align 5
> 74: aarch64_atomic_cmpxchg_1_default_impl:
> 75:         dmb     ish

Having argued above that this dmb is never needed why is it in this default impl? (also for size 4 and 8)

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

PR: https://git.openjdk.java.net/jdk/pull/2611


More information about the hotspot-dev mailing list