< prev index next >

src/hotspot/cpu/x86/gc/g1/g1BarrierSetAssembler_x86.cpp

Print this page




 332   // save the live input values
 333   __ push(store_addr);
 334   __ push(new_val);
 335 #ifdef _LP64
 336   __ call_VM_leaf(CAST_FROM_FN_PTR(address, G1BarrierSetRuntime::write_ref_field_post_entry), card_addr, r15_thread);
 337 #else
 338   __ push(thread);
 339   __ call_VM_leaf(CAST_FROM_FN_PTR(address, G1BarrierSetRuntime::write_ref_field_post_entry), card_addr, thread);
 340   __ pop(thread);
 341 #endif
 342   __ pop(new_val);
 343   __ pop(store_addr);
 344 
 345   __ bind(done);
 346 }
 347 
 348 void G1BarrierSetAssembler::oop_store_at(MacroAssembler* masm, DecoratorSet decorators, BasicType type,
 349                                          Address dst, Register val, Register tmp1, Register tmp2) {
 350   bool in_heap = (decorators & IN_HEAP) != 0;
 351   bool as_normal = (decorators & AS_NORMAL) != 0;
 352   assert((decorators & IS_DEST_UNINITIALIZED) == 0, "unsupported");
 353 
 354   bool needs_pre_barrier = as_normal;
 355   bool needs_post_barrier = val != noreg && in_heap;
 356 
 357   Register tmp3 = LP64_ONLY(r8) NOT_LP64(rsi);
 358   Register rthread = LP64_ONLY(r15_thread) NOT_LP64(rcx);
 359   // flatten object address if needed
 360   // We do it regardless of precise because we need the registers
 361   if (dst.index() == noreg && dst.disp() == 0) {
 362     if (dst.base() != tmp1) {
 363       __ movptr(tmp1, dst.base());
 364     }
 365   } else {
 366     __ lea(tmp1, dst);
 367   }
 368 
 369 #ifndef _LP64
 370   InterpreterMacroAssembler *imasm = static_cast<InterpreterMacroAssembler*>(masm);
 371 #endif
 372 
 373   NOT_LP64(__ get_thread(rcx));
 374   NOT_LP64(imasm->save_bcp());




 332   // save the live input values
 333   __ push(store_addr);
 334   __ push(new_val);
 335 #ifdef _LP64
 336   __ call_VM_leaf(CAST_FROM_FN_PTR(address, G1BarrierSetRuntime::write_ref_field_post_entry), card_addr, r15_thread);
 337 #else
 338   __ push(thread);
 339   __ call_VM_leaf(CAST_FROM_FN_PTR(address, G1BarrierSetRuntime::write_ref_field_post_entry), card_addr, thread);
 340   __ pop(thread);
 341 #endif
 342   __ pop(new_val);
 343   __ pop(store_addr);
 344 
 345   __ bind(done);
 346 }
 347 
 348 void G1BarrierSetAssembler::oop_store_at(MacroAssembler* masm, DecoratorSet decorators, BasicType type,
 349                                          Address dst, Register val, Register tmp1, Register tmp2) {
 350   bool in_heap = (decorators & IN_HEAP) != 0;
 351   bool as_normal = (decorators & AS_NORMAL) != 0;
 352   //assert((decorators & IS_DEST_UNINITIALIZED) == 0, "unsupported");
 353 
 354   bool needs_pre_barrier = as_normal && (! (decorators & IS_DEST_UNINITIALIZED) );
 355   bool needs_post_barrier = val != noreg && in_heap;
 356 
 357   Register tmp3 = LP64_ONLY(r8) NOT_LP64(rsi);
 358   Register rthread = LP64_ONLY(r15_thread) NOT_LP64(rcx);
 359   // flatten object address if needed
 360   // We do it regardless of precise because we need the registers
 361   if (dst.index() == noreg && dst.disp() == 0) {
 362     if (dst.base() != tmp1) {
 363       __ movptr(tmp1, dst.base());
 364     }
 365   } else {
 366     __ lea(tmp1, dst);
 367   }
 368 
 369 #ifndef _LP64
 370   InterpreterMacroAssembler *imasm = static_cast<InterpreterMacroAssembler*>(masm);
 371 #endif
 372 
 373   NOT_LP64(__ get_thread(rcx));
 374   NOT_LP64(imasm->save_bcp());


< prev index next >