--- old/src/os_cpu/bsd_x86/vm/atomic_bsd_x86.hpp 2017-07-17 10:42:55.426129078 +0200 +++ new/src/os_cpu/bsd_x86/vm/atomic_bsd_x86.hpp 2017-07-17 10:42:55.262129084 +0200 @@ -140,7 +140,7 @@ template <> inline int64_t Atomic::specialized_load(const volatile int64_t* src) { - volatile jlong dest; + volatile int64_t dest; _Atomic_move_long(src, &dest); return dest; } --- old/src/os_cpu/linux_arm/vm/atomic_linux_arm.hpp 2017-07-17 10:42:56.218129051 +0200 +++ new/src/os_cpu/linux_arm/vm/atomic_linux_arm.hpp 2017-07-17 10:42:56.058129056 +0200 @@ -147,7 +147,7 @@ template <> inline int64_t Atomic::specialized_cmpxchg(int64_t exchange_value, volatile int64_t* dest, int64_t compare_value, cmpxchg_memory_order order) { #ifdef AARCH64 - jlong rv; + int64_t rv; int tmp; __asm__ volatile( "1:\n\t" @@ -173,7 +173,7 @@ #ifdef AARCH64 template <> inline int64_t Atomic::specialized_add(int64_t add_value, volatile int64_t* dest) { - intptr_t val; + int64_t val; int tmp; __asm__ volatile( "1:\n\t" @@ -189,7 +189,7 @@ template <> inline int64_t Atomic::specialized_xchg(int64_t exchange_value, volatile int64_t* dest) { - intptr_t old_val; + int64_t old_val; int tmp; __asm__ volatile( "1:\n\t" --- old/src/os_cpu/linux_x86/vm/atomic_linux_x86.hpp 2017-07-17 10:42:57.034129022 +0200 +++ new/src/os_cpu/linux_x86/vm/atomic_linux_x86.hpp 2017-07-17 10:42:56.882129027 +0200 @@ -140,7 +140,7 @@ template <> inline int64_t Atomic::specialized_load(const volatile int64_t* src) { - volatile jlong dest; + volatile int64_t dest; _Atomic_move_long(src, &dest); return dest; } --- old/src/share/vm/metaprogramming/integerTypes.hpp 2017-07-17 10:42:57.798128995 +0200 +++ new/src/share/vm/metaprogramming/integerTypes.hpp 2017-07-17 10:42:57.690128999 +0200 @@ -224,7 +224,7 @@ // Cast integral value to pointer. template struct IntegerTypes::Cast VALUE_OBJ_CLASS_SPEC { - T operator()(U x) const { return (T)((void*)x); } + T operator()(U x) const { return reinterpret_cast(x); } }; // Same integral type is identity conversion. --- old/src/share/vm/runtime/atomic.hpp 2017-07-17 10:42:58.550128969 +0200 +++ new/src/share/vm/runtime/atomic.hpp 2017-07-17 10:42:58.418128974 +0200 @@ -26,13 +26,9 @@ #define SHARE_VM_RUNTIME_ATOMIC_HPP #include "memory/allocation.hpp" -#include "metaprogramming/conditional.hpp" -#include "metaprogramming/enableIf.hpp" #include "metaprogramming/integerTypes.hpp" #include "metaprogramming/isIntegral.hpp" #include "metaprogramming/isPointer.hpp" -#include "metaprogramming/isSame.hpp" -#include "metaprogramming/removePointer.hpp" #include "utilities/align.hpp" #include "utilities/debug.hpp" #include "utilities/macros.hpp" @@ -247,7 +243,7 @@ template inline U* Atomic::add(T add_value, U* volatile* dst) { STATIC_ASSERT(IsIntegral::value); - typedef typename IntegerTypes::Signed::type Raw; + typedef typename IntegerTypes::Signed::type Raw; ptrdiff_t value = add_value; Raw raw_value = IntegerTypes::cast_to_signed(value * sizeof(U)); Raw result = specialized_add(raw_value, reinterpret_cast(dst)); @@ -266,7 +262,7 @@ if (sizeof(T) != 1) { add(1, src); } else { - typedef typename IntegerTypes::Signed::type Raw; + typedef typename IntegerTypes::Signed::type Raw; specialized_inc(reinterpret_cast(src)); } } @@ -283,7 +279,7 @@ if (sizeof(T) != 1) { add(-1, src); } else { - typedef typename IntegerTypes::Signed::type Raw; + typedef typename IntegerTypes::Signed::type Raw; specialized_dec(reinterpret_cast(src)); } }