Print this page
rev 2162 : [mq]: code-review-comments-vladimir
rev 2164 : [mq]: code-review-comments-tom

Split Close
Expand all
Collapse all
          --- old/src/cpu/x86/vm/c1_LIRGenerator_x86.cpp
          +++ new/src/cpu/x86/vm/c1_LIRGenerator_x86.cpp
↓ open down ↓ 318 lines elided ↑ open up ↑
 319  319      LIR_Opr tmp1 = new_register(objectType);
 320  320      LIR_Opr tmp2 = new_register(objectType);
 321  321      LIR_Opr tmp3 = new_register(objectType);
 322  322  
 323  323      CodeEmitInfo* store_check_info = new CodeEmitInfo(range_check_info);
 324  324      __ store_check(value.result(), array.result(), tmp1, tmp2, tmp3, store_check_info);
 325  325    }
 326  326  
 327  327    if (obj_store) {
 328  328      // Needs GC write barriers.
 329      -    pre_barrier(LIR_OprFact::address(array_addr), false, NULL);
      329 +    pre_barrier(LIR_OprFact::address(array_addr), LIR_OprFact::illegalOpr /* pre_val */,
      330 +                true /* do_load */, false /* patch */, NULL);
 330  331      __ move(value.result(), array_addr, null_check_info);
 331  332      // Seems to be a precise
 332  333      post_barrier(LIR_OprFact::address(array_addr), value.result());
 333  334    } else {
 334  335      __ move(value.result(), array_addr, null_check_info);
 335  336    }
 336  337  }
 337  338  
 338  339  
 339  340  void LIRGenerator::do_MonitorEnter(MonitorEnter* x) {
↓ open down ↓ 447 lines elided ↑ open up ↑
 787  788      a = new LIR_Address(obj.result(),
 788  789                          offset.result(),
 789  790                          LIR_Address::times_1,
 790  791                          0,
 791  792                          as_BasicType(type));
 792  793    }
 793  794    __ leal(LIR_OprFact::address(a), addr);
 794  795  
 795  796    if (type == objectType) {  // Write-barrier needed for Object fields.
 796  797      // Do the pre-write barrier, if any.
 797      -    pre_barrier(addr, false, NULL);
      798 +    pre_barrier(addr, LIR_OprFact::illegalOpr /* pre_val */,
      799 +                true /* do_load */, false /* patch */, NULL);
 798  800    }
 799  801  
 800  802    LIR_Opr ill = LIR_OprFact::illegalOpr;  // for convenience
 801  803    if (type == objectType)
 802  804      __ cas_obj(addr, cmp.result(), val.result(), ill, ill);
 803  805    else if (type == intType)
 804  806      __ cas_int(addr, cmp.result(), val.result(), ill, ill);
 805  807    else if (type == longType)
 806  808      __ cas_long(addr, cmp.result(), val.result(), ill, ill);
 807  809    else {
↓ open down ↓ 524 lines elided ↑ open up ↑
1332 1334      LIR_Opr spill = new_register(T_DOUBLE);
1333 1335      set_vreg_flag(spill, must_start_in_memory);
1334 1336      __ move(data, spill);
1335 1337      __ move(spill, tmp);
1336 1338      __ move(tmp, addr);
1337 1339    } else {
1338 1340      LIR_Address* addr = new LIR_Address(src, offset, type);
1339 1341      bool is_obj = (type == T_ARRAY || type == T_OBJECT);
1340 1342      if (is_obj) {
1341 1343        // Do the pre-write barrier, if any.
1342      -      pre_barrier(LIR_OprFact::address(addr), false, NULL);
     1344 +      pre_barrier(LIR_OprFact::address(addr), LIR_OprFact::illegalOpr /* pre_val */,
     1345 +                  true /* do_load */, false /* patch */, NULL);
1343 1346        __ move(data, addr);
1344 1347        assert(src->is_register(), "must be register");
1345 1348        // Seems to be a precise address
1346 1349        post_barrier(LIR_OprFact::address(addr), data);
1347 1350      } else {
1348 1351        __ move(data, addr);
1349 1352      }
1350 1353    }
1351 1354  }
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX