< prev index next >

src/hotspot/cpu/arm/gc/g1/g1BarrierSetAssembler_arm.cpp

BarrierSetC1_v2

103   if (count != R1) {                                                                                                                 
104     __ mov(R1, count);                                                                                                               
105   }                                                                                                                                  
106 #if R9_IS_SCRATCHED                                                                                                                  
107   // Safer to save R9 here since callers may have been written                                                                       
108   // assuming R9 survives. This is suboptimal but is not in                                                                          
109   // general worth optimizing for the few platforms where R9                                                                         
110   // is scratched. Note that the optimization might not be to                                                                        
111   // difficult for this particular call site.                                                                                        
112   __ push(R9);                                                                                                                       
113 #endif // !R9_IS_SCRATCHED                                                                                                           
114 #endif // !AARCH64                                                                                                                   
115   __ call(CAST_FROM_FN_PTR(address, G1BarrierSet::write_ref_array_post_entry));                                                      
116 #ifndef AARCH64                                                                                                                      
117 #if R9_IS_SCRATCHED                                                                                                                  
118   __ pop(R9);                                                                                                                        
119 #endif // !R9_IS_SCRATCHED                                                                                                           
120 #endif // !AARCH64                                                                                                                   
121 }                                                                                                                                    
122 
                                                                                                                                     
                                                                                                                                     
123 #undef __                                                                                                                            
124 #define __ ce->masm()->                                                                                                              
125 
126 void G1BarrierSetAssembler::gen_g1_pre_barrier_stub(LIR_Assembler* ce, G1PreBarrierStub* stub) {                                     
127   // At this point we know that marking is in progress.                                                                              
128   // If do_load() is true then we have to emit the                                                                                   
129   // load of the previous value; otherwise it has already                                                                            
130   // been loaded into _pre_val.                                                                                                      
131 
132   __ bind(*stub->entry());                                                                                                           
133   assert(stub->pre_val()->is_register(), "Precondition.");                                                                           
134 
135   Register pre_val_reg = stub->pre_val()->as_register();                                                                             
136 
137   if (stub->do_load()) {                                                                                                             
138     ce->mem2reg(stub->addr(), stub->pre_val(), T_OBJECT, stub->patch_code(), stub->info(), false /*wide*/, false /*unaligned*/);     
139   }                                                                                                                                  
140 
141   __ cbz(pre_val_reg, *stub->continuation());                                                                                        

103   if (count != R1) {
104     __ mov(R1, count);
105   }
106 #if R9_IS_SCRATCHED
107   // Safer to save R9 here since callers may have been written
108   // assuming R9 survives. This is suboptimal but is not in
109   // general worth optimizing for the few platforms where R9
110   // is scratched. Note that the optimization might not be to
111   // difficult for this particular call site.
112   __ push(R9);
113 #endif // !R9_IS_SCRATCHED
114 #endif // !AARCH64
115   __ call(CAST_FROM_FN_PTR(address, G1BarrierSet::write_ref_array_post_entry));
116 #ifndef AARCH64
117 #if R9_IS_SCRATCHED
118   __ pop(R9);
119 #endif // !R9_IS_SCRATCHED
120 #endif // !AARCH64
121 }
122 
123 #ifdef COMPILER1
124 
125 #undef __
126 #define __ ce->masm()->
127 
128 void G1BarrierSetAssembler::gen_g1_pre_barrier_stub(LIR_Assembler* ce, G1PreBarrierStub* stub) {
129   // At this point we know that marking is in progress.
130   // If do_load() is true then we have to emit the
131   // load of the previous value; otherwise it has already
132   // been loaded into _pre_val.
133 
134   __ bind(*stub->entry());
135   assert(stub->pre_val()->is_register(), "Precondition.");
136 
137   Register pre_val_reg = stub->pre_val()->as_register();
138 
139   if (stub->do_load()) {
140     ce->mem2reg(stub->addr(), stub->pre_val(), T_OBJECT, stub->patch_code(), stub->info(), false /*wide*/, false /*unaligned*/);
141   }
142 
143   __ cbz(pre_val_reg, *stub->continuation());

336   __ str(r_index_2, queue_index);                                                                                                    
337 
338   __ str(r_card_addr_0, Address(r_buffer_3, r_index_2));                                                                             
339 
340   __ b(done);                                                                                                                        
341 
342   __ bind(runtime);                                                                                                                  
343 
344   __ save_live_registers();                                                                                                          
345 
346   assert(r_card_addr_0 == c_rarg0, "card_addr should be in R0");                                                                     
347   __ mov(c_rarg1, Rthread);                                                                                                          
348   __ call_VM_leaf(CAST_FROM_FN_PTR(address, SharedRuntime::g1_wb_post), c_rarg0, c_rarg1);                                           
349 
350   __ restore_live_registers_without_return();                                                                                        
351 
352   __ b(done);                                                                                                                        
353 }                                                                                                                                    
354 
355 #undef __                                                                                                                            
                                                                                                                                     
                                                                                                                                     

338   __ str(r_index_2, queue_index);
339 
340   __ str(r_card_addr_0, Address(r_buffer_3, r_index_2));
341 
342   __ b(done);
343 
344   __ bind(runtime);
345 
346   __ save_live_registers();
347 
348   assert(r_card_addr_0 == c_rarg0, "card_addr should be in R0");
349   __ mov(c_rarg1, Rthread);
350   __ call_VM_leaf(CAST_FROM_FN_PTR(address, SharedRuntime::g1_wb_post), c_rarg0, c_rarg1);
351 
352   __ restore_live_registers_without_return();
353 
354   __ b(done);
355 }
356 
357 #undef __
358 
359 #endif // COMPILER1
< prev index next >