< prev index next >
src/os_cpu/linux_sparc/vm/atomic_linux_sparc.inline.hpp
Print this page
rev 10933 : 8154736: enhancement of cmpxchg and copy_to_survivor for ppc64
Reviewed-by:
Contributed-by: HORII@jp.ibm.com, mdoerr
*** 146,166 ****
inline void* Atomic::xchg_ptr(void* exchange_value, volatile void* dest) {
return (void*)xchg_ptr((intptr_t)exchange_value, (volatile intptr_t*)dest);
}
! inline jint Atomic::cmpxchg (jint exchange_value, volatile jint* dest, jint compare_value) {
jint rv;
__asm__ volatile(
" cas [%2], %3, %0"
: "=r" (rv)
: "0" (exchange_value), "r" (dest), "r" (compare_value)
: "memory");
return rv;
}
! inline jlong Atomic::cmpxchg (jlong exchange_value, volatile jlong* dest, jlong compare_value) {
#ifdef _LP64
jlong rv;
__asm__ volatile(
" casx [%2], %3, %0"
: "=r" (rv)
--- 146,166 ----
inline void* Atomic::xchg_ptr(void* exchange_value, volatile void* dest) {
return (void*)xchg_ptr((intptr_t)exchange_value, (volatile intptr_t*)dest);
}
! inline jint Atomic::cmpxchg (jint exchange_value, volatile jint* dest, jint compare_value, memory_order order) {
jint rv;
__asm__ volatile(
" cas [%2], %3, %0"
: "=r" (rv)
: "0" (exchange_value), "r" (dest), "r" (compare_value)
: "memory");
return rv;
}
! inline jlong Atomic::cmpxchg (jlong exchange_value, volatile jlong* dest, jlong compare_value, memory_order order) {
#ifdef _LP64
jlong rv;
__asm__ volatile(
" casx [%2], %3, %0"
: "=r" (rv)
*** 188,198 ****
return rv.long_value;
#endif
}
! inline intptr_t Atomic::cmpxchg_ptr(intptr_t exchange_value, volatile intptr_t* dest, intptr_t compare_value) {
intptr_t rv;
#ifdef _LP64
__asm__ volatile(
" casx [%2], %3, %0"
: "=r" (rv)
--- 188,198 ----
return rv.long_value;
#endif
}
! inline intptr_t Atomic::cmpxchg_ptr(intptr_t exchange_value, volatile intptr_t* dest, intptr_t compare_value, memory_order order) {
intptr_t rv;
#ifdef _LP64
__asm__ volatile(
" casx [%2], %3, %0"
: "=r" (rv)
*** 206,215 ****
: "memory");
#endif // _LP64
return rv;
}
! inline void* Atomic::cmpxchg_ptr(void* exchange_value, volatile void* dest, void* compare_value) {
! return (void*)cmpxchg_ptr((intptr_t)exchange_value, (volatile intptr_t*)dest, (intptr_t)compare_value);
}
#endif // OS_CPU_LINUX_SPARC_VM_ATOMIC_LINUX_SPARC_INLINE_HPP
--- 206,215 ----
: "memory");
#endif // _LP64
return rv;
}
! inline void* Atomic::cmpxchg_ptr(void* exchange_value, volatile void* dest, void* compare_value, memory_order order) {
! return (void*)cmpxchg_ptr((intptr_t)exchange_value, (volatile intptr_t*)dest, (intptr_t)compare_value, order);
}
#endif // OS_CPU_LINUX_SPARC_VM_ATOMIC_LINUX_SPARC_INLINE_HPP
< prev index next >