< prev index next >

src/hotspot/cpu/x86/gc/shenandoah/shenandoahBarrierSetAssembler_x86.cpp

Print this page
rev 58687 : Shenandoah: New incremental-update mode
rev 58688 : [mq]: JDK-8242054-04.patch


  62         thread = rbx;
  63       }
  64       if (thread == src || thread == dst || thread == count) {
  65         thread = rcx;
  66       }
  67       if (thread == src || thread == dst || thread == count) {
  68         thread = rdx;
  69       }
  70       __ push(thread);
  71       __ get_thread(thread);
  72 #endif
  73       assert_different_registers(src, dst, count, thread);
  74 
  75       Label done;
  76       // Short-circuit if count == 0.
  77       __ testptr(count, count);
  78       __ jcc(Assembler::zero, done);
  79 
  80       // Avoid runtime call when not active.
  81       Address gc_state(thread, in_bytes(ShenandoahThreadLocalData::gc_state_offset()));
  82       int flags = ShenandoahHeap::HAS_FORWARDED;
  83       if (ShenandoahStoreValEnqueueBarrier || !dest_uninitialized) {
  84         flags |= ShenandoahHeap::MARKING;


  85       }
  86       __ testb(gc_state, flags);
  87       __ jcc(Assembler::zero, done);
  88 
  89       __ pusha();                      // push registers
  90 
  91 #ifdef _LP64
  92       assert(src == rdi, "expected");
  93       assert(dst == rsi, "expected");
  94       assert(count == rdx, "expected");
  95       if (UseCompressedOops) {
  96         __ call_VM_leaf(CAST_FROM_FN_PTR(address, ShenandoahRuntime::arraycopy_barrier_narrow_oop_entry),
  97                         src, dst, count);
  98       } else
  99 #endif
 100       {
 101         __ call_VM_leaf(CAST_FROM_FN_PTR(address, ShenandoahRuntime::arraycopy_barrier_oop_entry),
 102                         src, dst, count);
 103       }
 104 




  62         thread = rbx;
  63       }
  64       if (thread == src || thread == dst || thread == count) {
  65         thread = rcx;
  66       }
  67       if (thread == src || thread == dst || thread == count) {
  68         thread = rdx;
  69       }
  70       __ push(thread);
  71       __ get_thread(thread);
  72 #endif
  73       assert_different_registers(src, dst, count, thread);
  74 
  75       Label done;
  76       // Short-circuit if count == 0.
  77       __ testptr(count, count);
  78       __ jcc(Assembler::zero, done);
  79 
  80       // Avoid runtime call when not active.
  81       Address gc_state(thread, in_bytes(ShenandoahThreadLocalData::gc_state_offset()));
  82       int flags;
  83       if (ShenandoahSATBBarrier && dest_uninitialized) {
  84         flags = ShenandoahHeap::HAS_FORWARDED;
  85       } else {
  86         flags = ShenandoahHeap::HAS_FORWARDED | ShenandoahHeap::MARKING;
  87       }
  88       __ testb(gc_state, flags);
  89       __ jcc(Assembler::zero, done);
  90 
  91       __ pusha();                      // push registers
  92 
  93 #ifdef _LP64
  94       assert(src == rdi, "expected");
  95       assert(dst == rsi, "expected");
  96       assert(count == rdx, "expected");
  97       if (UseCompressedOops) {
  98         __ call_VM_leaf(CAST_FROM_FN_PTR(address, ShenandoahRuntime::arraycopy_barrier_narrow_oop_entry),
  99                         src, dst, count);
 100       } else
 101 #endif
 102       {
 103         __ call_VM_leaf(CAST_FROM_FN_PTR(address, ShenandoahRuntime::arraycopy_barrier_oop_entry),
 104                         src, dst, count);
 105       }
 106 


< prev index next >