--- old/src/hotspot/share/oops/access.inline.hpp 2019-11-21 11:54:17.540062436 +0100 +++ new/src/hotspot/share/oops/access.inline.hpp 2019-11-21 11:54:17.280058039 +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); } } }; @@ -171,12 +171,12 @@ 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); } }; @@ -323,17 +323,17 @@ } 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