< prev index next >

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

Print this page

176   }
177 
178   __ bind(done);
179 
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   BLOCK_COMMENT("ZBarrierSetAssembler::store_at {");
198 

199   // Verify oop store
200   if (is_reference_type(type)) {
201     // Note that src could be noreg, which means we
202     // are storing null and can skip verification.
203     if (src != noreg) {
204       Label done;
205       __ testptr(src, address_bad_mask_from_thread(r15_thread));
206       __ jcc(Assembler::zero, done);
207       __ stop("Verify oop store failed");
208       __ should_not_reach_here();
209       __ bind(done);
210     }
211   }
212 
213   // Store value
214   BarrierSetAssembler::store_at(masm, decorators, type, dst, src, tmp1, tmp2);
215 
216   BLOCK_COMMENT("} ZBarrierSetAssembler::store_at");
217 }
218 
219 #endif // ASSERT
220 
221 void ZBarrierSetAssembler::arraycopy_prologue(MacroAssembler* masm,
222                                               DecoratorSet decorators,
223                                               BasicType type,
224                                               Register src,
225                                               Register dst,
226                                               Register count) {
227   if (!ZBarrierSet::barrier_needed(decorators, type)) {
228     // Barrier not needed
229     return;
230   }
231 
232   BLOCK_COMMENT("ZBarrierSetAssembler::arraycopy_prologue {");
233 
234   // Save registers

176   }
177 
178   __ bind(done);
179 
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_INLINE_TYPE, "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 
221 #endif // ASSERT
222 
223 void ZBarrierSetAssembler::arraycopy_prologue(MacroAssembler* masm,
224                                               DecoratorSet decorators,
225                                               BasicType type,
226                                               Register src,
227                                               Register dst,
228                                               Register count) {
229   if (!ZBarrierSet::barrier_needed(decorators, type)) {
230     // Barrier not needed
231     return;
232   }
233 
234   BLOCK_COMMENT("ZBarrierSetAssembler::arraycopy_prologue {");
235 
236   // Save registers
< prev index next >