< prev index next >

src/hotspot/share/c1/c1_LIRGenerator.cpp

Print this page




1447     }
1448   }
1449 
1450   LIR_Opr result = new_register(t);
1451   __ move((LIR_Opr)c, result);
1452   _constants.append(c);
1453   _reg_for_constants.append(result);
1454   return result;
1455 }
1456 
1457 // Various barriers
1458 
1459 void LIRGenerator::pre_barrier(LIR_Opr addr_opr, LIR_Opr pre_val,
1460                                bool do_load, bool patch, CodeEmitInfo* info) {
1461   // Do the pre-write barrier, if any.
1462   switch (_bs->kind()) {
1463 #if INCLUDE_ALL_GCS
1464     case BarrierSet::G1BarrierSet:
1465       G1BarrierSet_pre_barrier(addr_opr, pre_val, do_load, patch, info);
1466       break;



1467 #endif // INCLUDE_ALL_GCS
1468     case BarrierSet::CardTableBarrierSet:
1469       // No pre barriers
1470       break;
1471     default      :
1472       ShouldNotReachHere();
1473 
1474   }
1475 }
1476 
1477 void LIRGenerator::post_barrier(LIR_OprDesc* addr, LIR_OprDesc* new_val) {
1478   switch (_bs->kind()) {
1479 #if INCLUDE_ALL_GCS
1480     case BarrierSet::G1BarrierSet:
1481       G1BarrierSet_post_barrier(addr,  new_val);



1482       break;
1483 #endif // INCLUDE_ALL_GCS
1484     case BarrierSet::CardTableBarrierSet:
1485       CardTableBarrierSet_post_barrier(addr,  new_val);
1486       break;
1487     default      :
1488       ShouldNotReachHere();
1489     }
1490 }
1491 
1492 ////////////////////////////////////////////////////////////////////////
1493 #if INCLUDE_ALL_GCS
1494 
1495 void LIRGenerator::G1BarrierSet_pre_barrier(LIR_Opr addr_opr, LIR_Opr pre_val,
1496                                             bool do_load, bool patch, CodeEmitInfo* info) {
1497   // First we test whether marking is in progress.
1498   BasicType flag_type;
1499   if (in_bytes(SATBMarkQueue::byte_width_of_active()) == 4) {
1500     flag_type = T_INT;
1501   } else {




1447     }
1448   }
1449 
1450   LIR_Opr result = new_register(t);
1451   __ move((LIR_Opr)c, result);
1452   _constants.append(c);
1453   _reg_for_constants.append(result);
1454   return result;
1455 }
1456 
1457 // Various barriers
1458 
1459 void LIRGenerator::pre_barrier(LIR_Opr addr_opr, LIR_Opr pre_val,
1460                                bool do_load, bool patch, CodeEmitInfo* info) {
1461   // Do the pre-write barrier, if any.
1462   switch (_bs->kind()) {
1463 #if INCLUDE_ALL_GCS
1464     case BarrierSet::G1BarrierSet:
1465       G1BarrierSet_pre_barrier(addr_opr, pre_val, do_load, patch, info);
1466       break;
1467     case BarrierSet::Epsilon:
1468       // No barriers
1469       break;
1470 #endif // INCLUDE_ALL_GCS
1471     case BarrierSet::CardTableBarrierSet:
1472       // No pre barriers
1473       break;
1474     default      :
1475       ShouldNotReachHere();
1476 
1477   }
1478 }
1479 
1480 void LIRGenerator::post_barrier(LIR_OprDesc* addr, LIR_OprDesc* new_val) {
1481   switch (_bs->kind()) {
1482 #if INCLUDE_ALL_GCS
1483     case BarrierSet::G1BarrierSet:
1484       G1BarrierSet_post_barrier(addr,  new_val);
1485       break;
1486     case BarrierSet::Epsilon:
1487       // No barriers
1488       break;
1489 #endif // INCLUDE_ALL_GCS
1490     case BarrierSet::CardTableBarrierSet:
1491       CardTableBarrierSet_post_barrier(addr,  new_val);
1492       break;
1493     default      :
1494       ShouldNotReachHere();
1495     }
1496 }
1497 
1498 ////////////////////////////////////////////////////////////////////////
1499 #if INCLUDE_ALL_GCS
1500 
1501 void LIRGenerator::G1BarrierSet_pre_barrier(LIR_Opr addr_opr, LIR_Opr pre_val,
1502                                             bool do_load, bool patch, CodeEmitInfo* info) {
1503   // First we test whether marking is in progress.
1504   BasicType flag_type;
1505   if (in_bytes(SATBMarkQueue::byte_width_of_active()) == 4) {
1506     flag_type = T_INT;
1507   } else {


< prev index next >