src/share/vm/c1/c1_LIRGenerator.cpp

Print this page

        

@@ -1307,11 +1307,11 @@
   LIR_Opr pre_val = new_register(T_OBJECT);
 
   __ cmp(lir_cond_notEqual, flag_val, LIR_OprFact::intConst(0));
   if (!addr_opr->is_address()) {
     assert(addr_opr->is_register(), "must be");
-    addr_opr = LIR_OprFact::address(new LIR_Address(addr_opr, 0, T_OBJECT));
+    addr_opr = LIR_OprFact::address(new LIR_Address(addr_opr, (intx)0, T_OBJECT));
   }
   CodeStub* slow = new G1PreBarrierStub(addr_opr, pre_val, pre_val_patch_code,
                                         info);
   __ branch(lir_cond_notEqual, T_INT, slow);
   __ branch_destination(slow->continuation());

@@ -1323,11 +1323,11 @@
   // If the "new_val" is a constant NULL, no barrier is necessary.
   if (new_val->is_constant() &&
       new_val->as_constant_ptr()->as_jobject() == NULL) return;
 
   if (!new_val->is_register()) {
-    LIR_Opr new_val_reg = new_pointer_register();
+    LIR_Opr new_val_reg = new_register(T_OBJECT);
     if (new_val->is_constant()) {
       __ move(new_val, new_val_reg);
     } else {
       __ leal(new_val, new_val_reg);
     }

@@ -1335,11 +1335,11 @@
   }
   assert(new_val->is_register(), "must be a register at this point");
 
   if (addr->is_address()) {
     LIR_Address* address = addr->as_address_ptr();
-    LIR_Opr ptr = new_pointer_register();
+    LIR_Opr ptr = new_register(T_OBJECT);
     if (!address->index()->is_valid() && address->disp() == 0) {
       __ move(address->base(), ptr);
     } else {
       assert(address->disp() != max_jint, "lea doesn't support patched addresses!");
       __ leal(addr, ptr);

@@ -1348,11 +1348,10 @@
   }
   assert(addr->is_register(), "must be a register at this point");
 
   LIR_Opr xor_res = new_pointer_register();
   LIR_Opr xor_shift_res = new_pointer_register();
-
   if (TwoOperandLIRForm ) {
     __ move(addr, xor_res);
     __ logical_xor(xor_res, new_val, xor_res);
     __ move(xor_res, xor_shift_res);
     __ unsigned_shift_right(xor_shift_res,

@@ -1366,20 +1365,20 @@
                             xor_shift_res,
                             LIR_OprDesc::illegalOpr());
   }
 
   if (!new_val->is_register()) {
-    LIR_Opr new_val_reg = new_pointer_register();
+    LIR_Opr new_val_reg = new_register(T_OBJECT);
     __ leal(new_val, new_val_reg);
     new_val = new_val_reg;
   }
   assert(new_val->is_register(), "must be a register at this point");
 
   __ cmp(lir_cond_notEqual, xor_shift_res, LIR_OprFact::intptrConst(NULL_WORD));
 
   CodeStub* slow = new G1PostBarrierStub(addr, new_val);
-  __ branch(lir_cond_notEqual, T_INT, slow);
+  __ branch(lir_cond_notEqual, LP64_ONLY(T_LONG) NOT_LP64(T_INT), slow);
   __ branch_destination(slow->continuation());
 }
 
 #endif // SERIALGC
 ////////////////////////////////////////////////////////////////////////