--- old/src/hotspot/os_cpu/windows_x86/atomic_windows_x86.hpp 2017-10-03 14:31:32.306897578 +0200 +++ new/src/hotspot/os_cpu/windows_x86/atomic_windows_x86.hpp 2017-10-03 14:31:32.070897586 +0200 @@ -42,21 +42,6 @@ #pragma warning(disable: 4035) // Disables warnings reporting missing return statement -inline void Atomic::store (jbyte store_value, jbyte* dest) { *dest = store_value; } -inline void Atomic::store (jshort store_value, jshort* dest) { *dest = store_value; } -inline void Atomic::store (jint store_value, jint* dest) { *dest = store_value; } - -inline void Atomic::store_ptr(intptr_t store_value, intptr_t* dest) { *dest = store_value; } -inline void Atomic::store_ptr(void* store_value, void* dest) { *(void**)dest = store_value; } - -inline void Atomic::store (jbyte store_value, volatile jbyte* dest) { *dest = store_value; } -inline void Atomic::store (jshort store_value, volatile jshort* dest) { *dest = store_value; } -inline void Atomic::store (jint store_value, volatile jint* dest) { *dest = store_value; } - - -inline void Atomic::store_ptr(intptr_t store_value, volatile intptr_t* dest) { *dest = store_value; } -inline void Atomic::store_ptr(void* store_value, volatile void* dest) { *(void* volatile *)dest = store_value; } - template struct Atomic::PlatformAdd : Atomic::AddAndFetch > @@ -66,9 +51,6 @@ }; #ifdef AMD64 -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; } - template<> template inline D Atomic::PlatformAdd<4>::add_and_fetch(I add_value, D volatile* dest) const { @@ -112,8 +94,6 @@ #undef DEFINE_STUB_CMPXCHG -inline jlong Atomic::load(const volatile jlong* src) { return *src; } - #else // !AMD64 template<> @@ -200,9 +180,12 @@ } } -inline jlong Atomic::load(const volatile jlong* src) { - volatile jlong dest; - volatile jlong* pdest = &dest; +template<> +template +inline T Atomic::PlatformLoad<8>::operator()(T const volatile* src) const { + STATIC_ASSERT(8 == sizeof(T)); + volatile T dest; + volatile T* pdest = &dest; __asm { mov eax, src fild qword ptr [eax] @@ -212,8 +195,12 @@ return dest; } -inline void Atomic::store(jlong store_value, volatile jlong* dest) { - volatile jlong* src = &store_value; +template<> +template +inline void Atomic::PlatformStore<8>::operator()(T store_value, + T volatile* dest) const { + STATIC_ASSERT(8 == sizeof(T)); + volatile T* src = &store_value; __asm { mov eax, src fild qword ptr [eax] @@ -222,10 +209,6 @@ } } -inline void Atomic::store(jlong store_value, jlong* dest) { - Atomic::store(store_value, (volatile jlong*)dest); -} - #endif // AMD64 #pragma warning(default: 4035) // Enables warnings reporting missing return statement