src/hotspot/cpu/x86/gc/shenandoah/shenandoahBarrierSetAssembler_x86.cpp
changeset 54425 13c02cc7a6e5
parent 54423 6c0ab8bd8da5
child 54755 de34f4b370b0
equal deleted inserted replaced
54424:b354ffb03ae4 54425:13c02cc7a6e5
   136     if (disjoint) {
   136     if (disjoint) {
   137       __ mov(dst, rdx); // restore 'to'
   137       __ mov(dst, rdx); // restore 'to'
   138     }
   138     }
   139 #endif
   139 #endif
   140 
   140 
       
   141     Register thread = NOT_LP64(rax) LP64_ONLY(r15_thread);
       
   142 #ifndef _LP64
       
   143     __ push(thread);
       
   144     __ get_thread(thread);
       
   145 #endif
       
   146 
       
   147     // Short-circuit if count == 0.
       
   148     Label done;
       
   149     __ testptr(count, count);
       
   150     __ jcc(Assembler::zero, done);
       
   151 
       
   152     // Skip runtime call if no forwarded objects.
       
   153     Address gc_state(thread, in_bytes(ShenandoahThreadLocalData::gc_state_offset()));
       
   154     __ testb(gc_state, ShenandoahHeap::UPDATEREFS);
       
   155     __ jcc(Assembler::zero, done);
       
   156 
   141     __ pusha();             // push registers (overkill)
   157     __ pusha();             // push registers (overkill)
   142 #ifdef _LP64
   158 #ifdef _LP64
   143     if (c_rarg0 == count) { // On win64 c_rarg0 == rcx
   159     if (c_rarg0 == count) { // On win64 c_rarg0 == rcx
   144       assert_different_registers(c_rarg1, dst);
   160       assert_different_registers(c_rarg1, dst);
   145       __ mov(c_rarg1, count);
   161       __ mov(c_rarg1, count);
   153 #else
   169 #else
   154     __ call_VM_leaf(CAST_FROM_FN_PTR(address, ShenandoahRuntime::write_ref_array_post_entry),
   170     __ call_VM_leaf(CAST_FROM_FN_PTR(address, ShenandoahRuntime::write_ref_array_post_entry),
   155                     dst, count);
   171                     dst, count);
   156 #endif
   172 #endif
   157     __ popa();
   173     __ popa();
       
   174 
       
   175     __ bind(done);
       
   176     NOT_LP64(__ pop(thread);)
   158   }
   177   }
   159 }
   178 }
   160 
   179 
   161 void ShenandoahBarrierSetAssembler::shenandoah_write_barrier_pre(MacroAssembler* masm,
   180 void ShenandoahBarrierSetAssembler::shenandoah_write_barrier_pre(MacroAssembler* masm,
   162                                                                  Register obj,
   181                                                                  Register obj,