--- old/src/os_cpu/aix_ppc/vm/atomic_aix_ppc.hpp 2017-08-16 01:47:20.749015895 -0400 +++ new/src/os_cpu/aix_ppc/vm/atomic_aix_ppc.hpp 2017-08-16 01:47:20.637010139 -0400 @@ -312,6 +312,8 @@ T volatile* dest, T compare_value, cmpxchg_memory_order order) const { + STATIC_CAST(1 == sizeof(T)); + // Note that cmpxchg guarantees a two-way memory barrier across // the cmpxchg, so it's really a a 'fence_cmpxchg_fence' if not // specified otherwise (see atomic.hpp). @@ -380,11 +382,13 @@ T volatile* dest, T compare_value, cmpxchg_memory_order order) const { + STATIC_CAST(4 == sizeof(T)); + // Note that cmpxchg guarantees a two-way memory barrier across // the cmpxchg, so it's really a a 'fence_cmpxchg_fence' if not // specified otherwise (see atomic.hpp). - unsigned int old_value; + T old_value; const uint64_t zero = 0; cmpxchg_pre_membar(order); @@ -419,7 +423,7 @@ cmpxchg_post_membar(order); - return IntegerTypes::cast(old_value); + return old_value; } template<> @@ -428,11 +432,13 @@ T volatile* dest, T compare_value, cmpxchg_memory_order order) const { + STATIC_CAST(8 == sizeof(T)); + // Note that cmpxchg guarantees a two-way memory barrier across // the cmpxchg, so it's really a a 'fence_cmpxchg_fence' if not // specified otherwise (see atomic.hpp). - long old_value; + T old_value; const uint64_t zero = 0; cmpxchg_pre_membar(order); @@ -467,7 +473,7 @@ cmpxchg_post_membar(order); - return IntegerTypes::cast(old_value); + return old_value; } #undef strasm_sync