< prev index next >

src/hotspot/cpu/s390/templateTable_s390.cpp

G1BarrierSet_merge

188 
189 // Do an oop store like *(base + offset) = val                                                                                       
190 // offset can be a register or a constant.                                                                                           
191 static void do_oop_store(InterpreterMacroAssembler* _masm,                                                                           
192                          Register base,                                                                                              
193                          RegisterOrConstant offset,                                                                                  
194                          Register val,                                                                                               
195                          bool val_is_null, // == false does not guarantee that val really is not equal NULL.                         
196                          Register tmp1,    // If tmp3 is volatile, either tmp1 or tmp2 must be                                       
197                          Register tmp2,    // non-volatile to hold a copy of pre_val across runtime calls.                           
198                          Register tmp3,    // Ideally, this tmp register is non-volatile, as it is used to                           
199                                            // hold pre_val (must survive runtime calls).                                             
200                          BarrierSet::Name barrier,                                                                                   
201                          bool precise) {                                                                                             
202   BLOCK_COMMENT("do_oop_store {");                                                                                                   
203   assert(val != noreg, "val must always be valid, even if it is zero");                                                              
204   assert_different_registers(tmp1, tmp2, tmp3, val, base, offset.register_or_noreg());                                               
205   __ verify_oop(val);                                                                                                                
206   switch (barrier) {                                                                                                                 
207 #if INCLUDE_ALL_GCS                                                                                                                  
208     case BarrierSet::G1SATBCTLogging:                                                                                                
209       {                                                                                                                              
210 #ifdef ASSERT                                                                                                                        
211         if (val_is_null) { // Check if the flag setting reflects reality.                                                            
212           Label OK;                                                                                                                  
213           __ z_ltgr(val, val);                                                                                                       
214           __ z_bre(OK);                                                                                                              
215           __ z_illtrap(0x11);                                                                                                        
216           __ bind(OK);                                                                                                               
217         }                                                                                                                            
218 #endif                                                                                                                               
219         Register pre_val = tmp3;                                                                                                     
220         // Load and record the previous value.                                                                                       
221         __ g1_write_barrier_pre(base, offset, pre_val, val,                                                                          
222                                 tmp1, tmp2,                                                                                          
223                                 false);  // Needs to hold pre_val in non_volatile register?                                          
224 
225         if (val_is_null) {                                                                                                           
226           __ store_heap_oop_null(val, offset, base);                                                                                 
227         } else {                                                                                                                     

188 
189 // Do an oop store like *(base + offset) = val
190 // offset can be a register or a constant.
191 static void do_oop_store(InterpreterMacroAssembler* _masm,
192                          Register base,
193                          RegisterOrConstant offset,
194                          Register val,
195                          bool val_is_null, // == false does not guarantee that val really is not equal NULL.
196                          Register tmp1,    // If tmp3 is volatile, either tmp1 or tmp2 must be
197                          Register tmp2,    // non-volatile to hold a copy of pre_val across runtime calls.
198                          Register tmp3,    // Ideally, this tmp register is non-volatile, as it is used to
199                                            // hold pre_val (must survive runtime calls).
200                          BarrierSet::Name barrier,
201                          bool precise) {
202   BLOCK_COMMENT("do_oop_store {");
203   assert(val != noreg, "val must always be valid, even if it is zero");
204   assert_different_registers(tmp1, tmp2, tmp3, val, base, offset.register_or_noreg());
205   __ verify_oop(val);
206   switch (barrier) {
207 #if INCLUDE_ALL_GCS
208     case BarrierSet::G1BarrierSet:
209       {
210 #ifdef ASSERT
211         if (val_is_null) { // Check if the flag setting reflects reality.
212           Label OK;
213           __ z_ltgr(val, val);
214           __ z_bre(OK);
215           __ z_illtrap(0x11);
216           __ bind(OK);
217         }
218 #endif
219         Register pre_val = tmp3;
220         // Load and record the previous value.
221         __ g1_write_barrier_pre(base, offset, pre_val, val,
222                                 tmp1, tmp2,
223                                 false);  // Needs to hold pre_val in non_volatile register?
224 
225         if (val_is_null) {
226           __ store_heap_oop_null(val, offset, base);
227         } else {
< prev index next >