< prev index next >

src/hotspot/cpu/x86/templateTable_x86.cpp

G1BarrierSet_merge

136   }                                                                                                                                  
137   ShouldNotReachHere();                                                                                                              
138   return Assembler::zero;                                                                                                            
139 }                                                                                                                                    
140 
141 
142 
143 // Miscelaneous helper routines                                                                                                      
144 // Store an oop (or NULL) at the address described by obj.                                                                           
145 // If val == noreg this means store a NULL                                                                                           
146 
147 
148 static void do_oop_store(InterpreterMacroAssembler* _masm,                                                                           
149                          Address obj,                                                                                                
150                          Register val,                                                                                               
151                          BarrierSet::Name barrier,                                                                                   
152                          bool precise) {                                                                                             
153   assert(val == noreg || val == rax, "parameter is just for looks");                                                                 
154   switch (barrier) {                                                                                                                 
155 #if INCLUDE_ALL_GCS                                                                                                                  
156     case BarrierSet::G1SATBCTLogging:                                                                                                
157       {                                                                                                                              
158         // flatten object address if needed                                                                                          
159         // We do it regardless of precise because we need the registers                                                              
160         if (obj.index() == noreg && obj.disp() == 0) {                                                                               
161           if (obj.base() != rdx) {                                                                                                   
162             __ movptr(rdx, obj.base());                                                                                              
163           }                                                                                                                          
164         } else {                                                                                                                     
165           __ lea(rdx, obj);                                                                                                          
166         }                                                                                                                            
167 
168         Register rtmp    = LP64_ONLY(r8)         NOT_LP64(rsi);                                                                      
169         Register rthread = LP64_ONLY(r15_thread) NOT_LP64(rcx);                                                                      
170 
171         NOT_LP64(__ get_thread(rcx));                                                                                                
172         NOT_LP64(__ save_bcp());                                                                                                     
173 
174         __ g1_write_barrier_pre(rdx /* obj */,                                                                                       
175                                 rbx /* pre_val */,                                                                                   

136   }
137   ShouldNotReachHere();
138   return Assembler::zero;
139 }
140 
141 
142 
143 // Miscelaneous helper routines
144 // Store an oop (or NULL) at the address described by obj.
145 // If val == noreg this means store a NULL
146 
147 
148 static void do_oop_store(InterpreterMacroAssembler* _masm,
149                          Address obj,
150                          Register val,
151                          BarrierSet::Name barrier,
152                          bool precise) {
153   assert(val == noreg || val == rax, "parameter is just for looks");
154   switch (barrier) {
155 #if INCLUDE_ALL_GCS
156     case BarrierSet::G1BarrierSet:
157       {
158         // flatten object address if needed
159         // We do it regardless of precise because we need the registers
160         if (obj.index() == noreg && obj.disp() == 0) {
161           if (obj.base() != rdx) {
162             __ movptr(rdx, obj.base());
163           }
164         } else {
165           __ lea(rdx, obj);
166         }
167 
168         Register rtmp    = LP64_ONLY(r8)         NOT_LP64(rsi);
169         Register rthread = LP64_ONLY(r15_thread) NOT_LP64(rcx);
170 
171         NOT_LP64(__ get_thread(rcx));
172         NOT_LP64(__ save_bcp());
173 
174         __ g1_write_barrier_pre(rdx /* obj */,
175                                 rbx /* pre_val */,
< prev index next >