--- old/src/os_cpu/linux_aarch64/vm/atomic_linux_aarch64.hpp 2017-08-20 02:08:24.090981714 -0400 +++ new/src/os_cpu/linux_aarch64/vm/atomic_linux_aarch64.hpp 2017-08-20 02:08:23.974975764 -0400 @@ -47,10 +47,15 @@ inline void Atomic::store_ptr(void* store_value, volatile void* dest) { *(void* volatile *)dest = store_value; } -inline jint Atomic::add(jint add_value, volatile jint* dest) +template +struct Atomic::PlatformAdd + : Atomic::AddAndFetch > { - return __sync_add_and_fetch(dest, add_value); -} + template + D add_and_fetch(I add_value, D volatile* dest) const { + return __sync_add_and_fetch(dest, add_value); + } +}; inline void Atomic::inc(volatile jint* dest) { @@ -105,16 +110,6 @@ inline void Atomic::store (jlong store_value, jlong* dest) { *dest = store_value; } inline void Atomic::store (jlong store_value, volatile jlong* dest) { *dest = store_value; } -inline intptr_t Atomic::add_ptr(intptr_t add_value, volatile intptr_t* dest) -{ - return __sync_add_and_fetch(dest, add_value); -} - -inline void* Atomic::add_ptr(intptr_t add_value, volatile void* dest) -{ - return (void *) add_ptr(add_value, (volatile intptr_t *) dest); -} - inline void Atomic::inc_ptr(volatile intptr_t* dest) { add_ptr(1, dest);