--- old/src/hotspot/share/oops/access.inline.hpp 2019-11-21 11:58:12.208028345 +0100 +++ new/src/hotspot/share/oops/access.inline.hpp 2019-11-21 11:58:11.776021050 +0100 @@ -90,16 +90,16 @@ template struct PostRuntimeDispatch: public AllStatic { template - static T access_barrier(T new_value, void* addr) { - return GCBarrierType::atomic_xchg_in_heap(new_value, reinterpret_cast(addr)); + static T access_barrier(void* addr, T new_value) { + return GCBarrierType::atomic_xchg_in_heap(reinterpret_cast(addr), new_value); } - static oop oop_access_barrier(oop new_value, void* addr) { + static oop oop_access_barrier(void* addr, oop new_value) { typedef typename HeapOopType::type OopType; if (HasDecorator::value) { - return GCBarrierType::oop_atomic_xchg_in_heap(new_value, reinterpret_cast(addr)); + return GCBarrierType::oop_atomic_xchg_in_heap(reinterpret_cast(addr), new_value); } else { - return GCBarrierType::oop_atomic_xchg_not_in_heap(new_value, reinterpret_cast(addr)); + return GCBarrierType::oop_atomic_xchg_not_in_heap(reinterpret_cast(addr), new_value); } } }; @@ -107,16 +107,16 @@ template struct PostRuntimeDispatch: public AllStatic { template - static T access_barrier(T new_value, void* addr, T compare_value) { - return GCBarrierType::atomic_cmpxchg_in_heap(new_value, reinterpret_cast(addr), compare_value); + static T access_barrier(void* addr, T compare_value, T new_value) { + return GCBarrierType::atomic_cmpxchg_in_heap(reinterpret_cast(addr), compare_value, new_value); } - static oop oop_access_barrier(oop new_value, void* addr, oop compare_value) { + static oop oop_access_barrier(void* addr, oop compare_value, oop new_value) { typedef typename HeapOopType::type OopType; if (HasDecorator::value) { - return GCBarrierType::oop_atomic_cmpxchg_in_heap(new_value, reinterpret_cast(addr), compare_value); + return GCBarrierType::oop_atomic_cmpxchg_in_heap(reinterpret_cast(addr), compare_value, new_value); } else { - return GCBarrierType::oop_atomic_cmpxchg_not_in_heap(new_value, reinterpret_cast(addr), compare_value); + return GCBarrierType::oop_atomic_cmpxchg_not_in_heap(reinterpret_cast(addr), compare_value, new_value); } } }; @@ -171,24 +171,24 @@ template struct PostRuntimeDispatch: public AllStatic { template - static T access_barrier(T new_value, oop base, ptrdiff_t offset) { - return GCBarrierType::atomic_xchg_in_heap_at(new_value, base, offset); + static T access_barrier(oop base, ptrdiff_t offset, T new_value) { + return GCBarrierType::atomic_xchg_in_heap_at(base, offset, new_value); } - static oop oop_access_barrier(oop new_value, oop base, ptrdiff_t offset) { - return GCBarrierType::oop_atomic_xchg_in_heap_at(new_value, base, offset); + static oop oop_access_barrier(oop base, ptrdiff_t offset, oop new_value) { + return GCBarrierType::oop_atomic_xchg_in_heap_at(base, offset, new_value); } }; template struct PostRuntimeDispatch: public AllStatic { template - static T access_barrier(T new_value, oop base, ptrdiff_t offset, T compare_value) { - return GCBarrierType::atomic_cmpxchg_in_heap_at(new_value, base, offset, compare_value); + static T access_barrier(oop base, ptrdiff_t offset, T compare_value, T new_value) { + return GCBarrierType::atomic_cmpxchg_in_heap_at(base, offset, compare_value, new_value); } - static oop oop_access_barrier(oop new_value, oop base, ptrdiff_t offset, oop compare_value) { - return GCBarrierType::oop_atomic_cmpxchg_in_heap_at(new_value, base, offset, compare_value); + static oop oop_access_barrier(oop base, ptrdiff_t offset, oop compare_value, oop new_value) { + return GCBarrierType::oop_atomic_cmpxchg_in_heap_at(base, offset, compare_value, new_value); } }; @@ -309,31 +309,31 @@ } template - T RuntimeDispatch::atomic_cmpxchg_init(T new_value, void* addr, T compare_value) { + T RuntimeDispatch::atomic_cmpxchg_init(void* addr, T compare_value, T new_value) { func_t function = BarrierResolver::resolve_barrier(); _atomic_cmpxchg_func = function; - return function(new_value, addr, compare_value); + return function(addr, compare_value, new_value); } template - T RuntimeDispatch::atomic_cmpxchg_at_init(T new_value, oop base, ptrdiff_t offset, T compare_value) { + T RuntimeDispatch::atomic_cmpxchg_at_init(oop base, ptrdiff_t offset, T compare_value, T new_value) { func_t function = BarrierResolver::resolve_barrier(); _atomic_cmpxchg_at_func = function; - return function(new_value, base, offset, compare_value); + return function(base, offset, compare_value, new_value); } template - T RuntimeDispatch::atomic_xchg_init(T new_value, void* addr) { + T RuntimeDispatch::atomic_xchg_init(void* addr, T new_value) { func_t function = BarrierResolver::resolve_barrier(); _atomic_xchg_func = function; - return function(new_value, addr); + return function(addr, new_value); } template - T RuntimeDispatch::atomic_xchg_at_init(T new_value, oop base, ptrdiff_t offset) { + T RuntimeDispatch::atomic_xchg_at_init(oop base, ptrdiff_t offset, T new_value) { func_t function = BarrierResolver::resolve_barrier(); _atomic_xchg_at_func = function; - return function(new_value, base, offset); + return function(base, offset, new_value); } template