< prev index next >
src/hotspot/os_cpu/bsd_x86/atomic_bsd_x86.hpp
Print this page
@@ -62,13 +62,13 @@
return exchange_value;
}
template<>
template<typename T>
-inline T Atomic::PlatformCmpxchg<1>::operator()(T exchange_value,
- T volatile* dest,
+inline T Atomic::PlatformCmpxchg<1>::operator()(T volatile* dest,
T compare_value,
+ T exchange_value,
atomic_memory_order /* order */) const {
STATIC_ASSERT(1 == sizeof(T));
__asm__ volatile ( "lock cmpxchgb %1,(%3)"
: "=a" (exchange_value)
: "q" (exchange_value), "a" (compare_value), "r" (dest)
@@ -76,13 +76,13 @@
return exchange_value;
}
template<>
template<typename T>
-inline T Atomic::PlatformCmpxchg<4>::operator()(T exchange_value,
- T volatile* dest,
+inline T Atomic::PlatformCmpxchg<4>::operator()(T volatile* dest,
T compare_value,
+ T exchange_value,
atomic_memory_order /* order */) const {
STATIC_ASSERT(4 == sizeof(T));
__asm__ volatile ( "lock cmpxchgl %1,(%3)"
: "=a" (exchange_value)
: "r" (exchange_value), "a" (compare_value), "r" (dest)
@@ -118,13 +118,13 @@
return exchange_value;
}
template<>
template<typename T>
-inline T Atomic::PlatformCmpxchg<8>::operator()(T exchange_value,
- T volatile* dest,
+inline T Atomic::PlatformCmpxchg<8>::operator()(T volatile* dest,
T compare_value,
+ T exchange_value,
atomic_memory_order /* order */) const {
STATIC_ASSERT(8 == sizeof(T));
__asm__ __volatile__ ( "lock cmpxchgq %1,(%3)"
: "=a" (exchange_value)
: "r" (exchange_value), "a" (compare_value), "r" (dest)
@@ -140,16 +140,16 @@
void _Atomic_move_long(const volatile int64_t* src, volatile int64_t* dst);
}
template<>
template<typename T>
-inline T Atomic::PlatformCmpxchg<8>::operator()(T exchange_value,
- T volatile* dest,
+inline T Atomic::PlatformCmpxchg<8>::operator()(T volatile* dest,
T compare_value,
+ T exchange_value,
atomic_memory_order /* order */) const {
STATIC_ASSERT(8 == sizeof(T));
- return cmpxchg_using_helper<int64_t>(_Atomic_cmpxchg_long, exchange_value, dest, compare_value);
+ return cmpxchg_using_helper<int64_t>(_Atomic_cmpxchg_long, dest, compare_value, exchange_value);
}
template<>
template<typename T>
inline T Atomic::PlatformLoad<8>::operator()(T const volatile* src) const {
< prev index next >