< prev index next >

src/hotspot/cpu/x86/c1_LIRGenerator_x86.cpp

Print this page

        

@@ -768,11 +768,11 @@
                         as_BasicType(type));
   }
   __ leal(LIR_OprFact::address(a), addr);
 
   if (type == objectType) {  // Write-barrier needed for Object fields.
-    if (UseLoadBarrier) {
+    if (UseZGC) {
       // Load barrier to make sure that cas_obj() sees a correct oop.
       LIR_Opr pre_val = new_register(T_OBJECT);
       __ load(new LIR_Address(addr, as_BasicType(type)), pre_val);
       load_barrier(pre_val, addr);
     }

@@ -1617,11 +1617,11 @@
     __ move(tmp, spill);
     __ move(spill, dst);
   } else {
     LIR_Address* addr = new LIR_Address(src, offset, type);
     __ load(addr, dst);
-    if (type == T_OBJECT && UseLoadBarrier) {
+    if (type == T_OBJECT && UseZGC) {
       load_barrier(dst, LIR_OprFact::address(addr));
     }
   }
 }
 

@@ -1698,11 +1698,11 @@
       pre_barrier(LIR_OprFact::address(addr), LIR_OprFact::illegalOpr /* pre_val */,
                   true /* do_load */, false /* patch */, NULL);
     }
     __ xchg(LIR_OprFact::address(addr), dst, dst, LIR_OprFact::illegalOpr);
     if (is_obj) {
-      if (UseLoadBarrier) {
+      if (UseZGC) {
         load_barrier(dst);
       }
 
       // Seems to be a precise address
       post_barrier(LIR_OprFact::address(addr), data);
< prev index next >