< prev index next >

src/hotspot/cpu/x86/gc/z/zBarrierSetAssembler_x86.cpp

Print this page

180   // Restore scratch register
181   if (tmp1 == noreg) {
182     __ pop(scratch);
183   }
184 
185   BLOCK_COMMENT("} ZBarrierSetAssembler::load_at");
186 }
187 
188 #ifdef ASSERT
189 
190 void ZBarrierSetAssembler::store_at(MacroAssembler* masm,
191                                     DecoratorSet decorators,
192                                     BasicType type,
193                                     Address dst,
194                                     Register src,
195                                     Register tmp1,
196                                     Register tmp2,
197                                     Register tmp3) {
198   BLOCK_COMMENT("ZBarrierSetAssembler::store_at {");
199 

200   // Verify oop store
201   if (is_reference_type(type)) {
202     // Note that src could be noreg, which means we
203     // are storing null and can skip verification.
204     if (src != noreg) {
205       Label done;
206       __ testptr(src, address_bad_mask_from_thread(r15_thread));
207       __ jcc(Assembler::zero, done);
208       __ stop("Verify oop store failed");
209       __ should_not_reach_here();
210       __ bind(done);
211     }
212   }
213 
214   // Store value
215   BarrierSetAssembler::store_at(masm, decorators, type, dst, src, tmp1, tmp2, tmp3);
216 
217   BLOCK_COMMENT("} ZBarrierSetAssembler::store_at");
218 }
219 

180   // Restore scratch register
181   if (tmp1 == noreg) {
182     __ pop(scratch);
183   }
184 
185   BLOCK_COMMENT("} ZBarrierSetAssembler::load_at");
186 }
187 
188 #ifdef ASSERT
189 
190 void ZBarrierSetAssembler::store_at(MacroAssembler* masm,
191                                     DecoratorSet decorators,
192                                     BasicType type,
193                                     Address dst,
194                                     Register src,
195                                     Register tmp1,
196                                     Register tmp2,
197                                     Register tmp3) {
198   BLOCK_COMMENT("ZBarrierSetAssembler::store_at {");
199 
200   assert(type != T_PRIMITIVE_OBJECT, "Not supported yet");
201   // Verify oop store
202   if (is_reference_type(type)) {
203     // Note that src could be noreg, which means we
204     // are storing null and can skip verification.
205     if (src != noreg) {
206       Label done;
207       __ testptr(src, address_bad_mask_from_thread(r15_thread));
208       __ jcc(Assembler::zero, done);
209       __ stop("Verify oop store failed");
210       __ should_not_reach_here();
211       __ bind(done);
212     }
213   }
214 
215   // Store value
216   BarrierSetAssembler::store_at(masm, decorators, type, dst, src, tmp1, tmp2, tmp3);
217 
218   BLOCK_COMMENT("} ZBarrierSetAssembler::store_at");
219 }
220 
< prev index next >