< prev index next >

src/os_cpu/linux_s390/vm/atomic_linux_s390.hpp

Print this page
rev 13459 : [mq]: s390_fix

*** 487,497 **** inline T Atomic::PlatformCmpxchg<4>::operator()(T xchg_val, T volatile* dest, T cmp_val, cmpxchg_memory_order unused) const { STATIC_ASSERT(4 == sizeof(T)); ! unsigned long old; __asm__ __volatile__ ( " CS %[old],%[upd],%[mem] \n\t" // Try to xchg upd with mem. // outputs : [old] "=&d" (old) // Write-only, prev value irrelevant. --- 487,497 ---- inline T Atomic::PlatformCmpxchg<4>::operator()(T xchg_val, T volatile* dest, T cmp_val, cmpxchg_memory_order unused) const { STATIC_ASSERT(4 == sizeof(T)); ! T old; __asm__ __volatile__ ( " CS %[old],%[upd],%[mem] \n\t" // Try to xchg upd with mem. // outputs : [old] "=&d" (old) // Write-only, prev value irrelevant.
*** 501,511 **** , "0" (cmp_val) // Read-only, initial value for [old] (operand #0). // clobbered : "cc" ); ! return IntegerTypes::cast<T>((uint32_t)old); } template<> template<typename T> inline T Atomic::PlatformCmpxchg<8>::operator()(T xchg_val, --- 501,511 ---- , "0" (cmp_val) // Read-only, initial value for [old] (operand #0). // clobbered : "cc" ); ! return old; } template<> template<typename T> inline T Atomic::PlatformCmpxchg<8>::operator()(T xchg_val,
< prev index next >