--- a/src/hotspot/share/gc/g1/g1HotCardCache.cpp Mon Nov 25 12:32:40 2019 +0100
+++ b/src/hotspot/share/gc/g1/g1HotCardCache.cpp Mon Nov 25 12:33:15 2019 +0100
@@ -78,9 +78,9 @@
// card_ptr in favor of the other option, which would be starting over. This
// should be OK since card_ptr will likely be the older card already when/if
// this ever happens.
- CardValue* previous_ptr = Atomic::cmpxchg(card_ptr,
- &_hot_cache[masked_index],
- current_ptr);
+ CardValue* previous_ptr = Atomic::cmpxchg(&_hot_cache[masked_index],
+ current_ptr,
+ card_ptr);
return (previous_ptr == current_ptr) ? previous_ptr : card_ptr;
}