< prev index next >

src/hotspot/share/c1/c1_LIRGenerator.cpp

G1BarrierSet_merge

1441         break;                                                                                                                       
1442       }                                                                                                                              
1443       return _reg_for_constants.at(i);                                                                                               
1444     }                                                                                                                                
1445   }                                                                                                                                  
1446 
1447   LIR_Opr result = new_register(t);                                                                                                  
1448   __ move((LIR_Opr)c, result);                                                                                                       
1449   _constants.append(c);                                                                                                              
1450   _reg_for_constants.append(result);                                                                                                 
1451   return result;                                                                                                                     
1452 }                                                                                                                                    
1453 
1454 // Various barriers                                                                                                                  
1455 
1456 void LIRGenerator::pre_barrier(LIR_Opr addr_opr, LIR_Opr pre_val,                                                                    
1457                                bool do_load, bool patch, CodeEmitInfo* info) {                                                       
1458   // Do the pre-write barrier, if any.                                                                                               
1459   switch (_bs->kind()) {                                                                                                             
1460 #if INCLUDE_ALL_GCS                                                                                                                  
1461     case BarrierSet::G1SATBCTLogging:                                                                                                
1462       G1SATBCardTableModRef_pre_barrier(addr_opr, pre_val, do_load, patch, info);                                                    
1463       break;                                                                                                                         
1464 #endif // INCLUDE_ALL_GCS                                                                                                            
1465     case BarrierSet::CardTableModRef:                                                                                                
1466       // No pre barriers                                                                                                             
1467       break;                                                                                                                         
1468     default      :                                                                                                                   
1469       ShouldNotReachHere();                                                                                                          
1470 
1471   }                                                                                                                                  
1472 }                                                                                                                                    
1473 
1474 void LIRGenerator::post_barrier(LIR_OprDesc* addr, LIR_OprDesc* new_val) {                                                           
1475   switch (_bs->kind()) {                                                                                                             
1476 #if INCLUDE_ALL_GCS                                                                                                                  
1477     case BarrierSet::G1SATBCTLogging:                                                                                                
1478       G1SATBCardTableModRef_post_barrier(addr,  new_val);                                                                            
1479       break;                                                                                                                         
1480 #endif // INCLUDE_ALL_GCS                                                                                                            
1481     case BarrierSet::CardTableModRef:                                                                                                
1482       CardTableModRef_post_barrier(addr,  new_val);                                                                                  
1483       break;                                                                                                                         
1484     default      :                                                                                                                   
1485       ShouldNotReachHere();                                                                                                          
1486     }                                                                                                                                
1487 }                                                                                                                                    
1488 
1489 ////////////////////////////////////////////////////////////////////////                                                             
1490 #if INCLUDE_ALL_GCS                                                                                                                  
1491 
1492 void LIRGenerator::G1SATBCardTableModRef_pre_barrier(LIR_Opr addr_opr, LIR_Opr pre_val,                                              
1493                                                      bool do_load, bool patch, CodeEmitInfo* info) {                                 
1494   // First we test whether marking is in progress.                                                                                   
1495   BasicType flag_type;                                                                                                               
1496   if (in_bytes(SATBMarkQueue::byte_width_of_active()) == 4) {                                                                        

1441         break;
1442       }
1443       return _reg_for_constants.at(i);
1444     }
1445   }
1446 
1447   LIR_Opr result = new_register(t);
1448   __ move((LIR_Opr)c, result);
1449   _constants.append(c);
1450   _reg_for_constants.append(result);
1451   return result;
1452 }
1453 
1454 // Various barriers
1455 
1456 void LIRGenerator::pre_barrier(LIR_Opr addr_opr, LIR_Opr pre_val,
1457                                bool do_load, bool patch, CodeEmitInfo* info) {
1458   // Do the pre-write barrier, if any.
1459   switch (_bs->kind()) {
1460 #if INCLUDE_ALL_GCS
1461     case BarrierSet::G1BarrierSet:
1462       G1SATBCardTableModRef_pre_barrier(addr_opr, pre_val, do_load, patch, info);
1463       break;
1464 #endif // INCLUDE_ALL_GCS
1465     case BarrierSet::CardTableModRef:
1466       // No pre barriers
1467       break;
1468     default      :
1469       ShouldNotReachHere();
1470 
1471   }
1472 }
1473 
1474 void LIRGenerator::post_barrier(LIR_OprDesc* addr, LIR_OprDesc* new_val) {
1475   switch (_bs->kind()) {
1476 #if INCLUDE_ALL_GCS
1477     case BarrierSet::G1BarrierSet:
1478       G1SATBCardTableModRef_post_barrier(addr,  new_val);
1479       break;
1480 #endif // INCLUDE_ALL_GCS
1481     case BarrierSet::CardTableModRef:
1482       CardTableModRef_post_barrier(addr,  new_val);
1483       break;
1484     default      :
1485       ShouldNotReachHere();
1486     }
1487 }
1488 
1489 ////////////////////////////////////////////////////////////////////////
1490 #if INCLUDE_ALL_GCS
1491 
1492 void LIRGenerator::G1SATBCardTableModRef_pre_barrier(LIR_Opr addr_opr, LIR_Opr pre_val,
1493                                                      bool do_load, bool patch, CodeEmitInfo* info) {
1494   // First we test whether marking is in progress.
1495   BasicType flag_type;
1496   if (in_bytes(SATBMarkQueue::byte_width_of_active()) == 4) {
< prev index next >