< prev index next >

src/hotspot/cpu/x86/macroAssembler_x86.cpp

Print this page
rev 50076 : Fold Partial GC into Traversal GC


5354   // Resolve jweak.
5355   access_load_at(T_OBJECT, IN_ROOT | ON_PHANTOM_OOP_REF,
5356                  value, Address(value, -JNIHandles::weak_tag_value), tmp, thread);
5357   verify_oop(value);
5358   jmp(done);
5359   bind(not_weak);
5360   // Resolve (untagged) jobject.
5361   access_load_at(T_OBJECT, IN_ROOT | IN_CONCURRENT_ROOT,
5362                  value, Address(value, 0), tmp, thread);
5363   verify_oop(value);
5364   bind(done);
5365 }
5366 
5367 #ifdef INCLUDE_ALL_GCS
5368 #ifndef _LP64
5369 void MacroAssembler::shenandoah_write_barrier(Register dst) {
5370   Unimplemented();
5371 }
5372 #else
5373 void MacroAssembler::shenandoah_write_barrier(Register dst) {
5374   assert(UseShenandoahGC && (ShenandoahWriteBarrier || ShenandoahStoreValWriteBarrier || ShenandoahStoreValEnqueueBarrier), "Should be enabled");
5375 
5376   Label done;
5377 
5378   // Check for evacuation-in-progress
5379   Address gc_state(r15_thread, in_bytes(ShenandoahThreadLocalData::gc_state_offset()));
5380   testb(gc_state, ShenandoahHeap::EVACUATION | ShenandoahHeap::PARTIAL | ShenandoahHeap::TRAVERSAL);
5381 
5382   // The read-barrier.
5383   if (ShenandoahWriteBarrierRB) {
5384     movptr(dst, Address(dst, BrooksPointer::byte_offset()));
5385   }
5386 
5387   jccb(Assembler::zero, done);
5388 
5389   if (dst != rax) {
5390     xchgptr(dst, rax); // Move obj into rax and save rax into obj.
5391   }
5392 
5393   assert(StubRoutines::x86::shenandoah_wb() != NULL, "need write barrier stub");
5394   call(RuntimeAddress(CAST_FROM_FN_PTR(address, StubRoutines::x86::shenandoah_wb())));
5395 
5396   if (dst != rax) {
5397     xchgptr(rax, dst); // Swap back obj with rax.
5398   }
5399 
5400   bind(done);




5354   // Resolve jweak.
5355   access_load_at(T_OBJECT, IN_ROOT | ON_PHANTOM_OOP_REF,
5356                  value, Address(value, -JNIHandles::weak_tag_value), tmp, thread);
5357   verify_oop(value);
5358   jmp(done);
5359   bind(not_weak);
5360   // Resolve (untagged) jobject.
5361   access_load_at(T_OBJECT, IN_ROOT | IN_CONCURRENT_ROOT,
5362                  value, Address(value, 0), tmp, thread);
5363   verify_oop(value);
5364   bind(done);
5365 }
5366 
5367 #ifdef INCLUDE_ALL_GCS
5368 #ifndef _LP64
5369 void MacroAssembler::shenandoah_write_barrier(Register dst) {
5370   Unimplemented();
5371 }
5372 #else
5373 void MacroAssembler::shenandoah_write_barrier(Register dst) {
5374   assert(UseShenandoahGC && (ShenandoahWriteBarrier || ShenandoahStoreValEnqueueBarrier), "Should be enabled");
5375 
5376   Label done;
5377 
5378   // Check for evacuation-in-progress
5379   Address gc_state(r15_thread, in_bytes(ShenandoahThreadLocalData::gc_state_offset()));
5380   testb(gc_state, ShenandoahHeap::EVACUATION | ShenandoahHeap::TRAVERSAL);
5381 
5382   // The read-barrier.
5383   if (ShenandoahWriteBarrierRB) {
5384     movptr(dst, Address(dst, BrooksPointer::byte_offset()));
5385   }
5386 
5387   jccb(Assembler::zero, done);
5388 
5389   if (dst != rax) {
5390     xchgptr(dst, rax); // Move obj into rax and save rax into obj.
5391   }
5392 
5393   assert(StubRoutines::x86::shenandoah_wb() != NULL, "need write barrier stub");
5394   call(RuntimeAddress(CAST_FROM_FN_PTR(address, StubRoutines::x86::shenandoah_wb())));
5395 
5396   if (dst != rax) {
5397     xchgptr(rax, dst); // Swap back obj with rax.
5398   }
5399 
5400   bind(done);


< prev index next >