< prev index next >

src/cpu/x86/vm/shenandoahBarrierSet_x86.cpp

Print this page
rev 10557 : [backport] Assembler write barriers should consistently check for forwarded objects

*** 59,73 **** assert(dst != rscratch1, "different regs"); Label done; Address gc_state(r15_thread, in_bytes(JavaThread::gc_state_offset())); - __ testb(gc_state, ShenandoahHeap::EVACUATION); // Now check if evacuation is in progress. interpreter_read_barrier_not_null(masm, dst); __ jcc(Assembler::zero, done); __ push(rscratch1); __ push(rscratch2); __ movptr(rscratch1, dst); --- 59,77 ---- assert(dst != rscratch1, "different regs"); Label done; Address gc_state(r15_thread, in_bytes(JavaThread::gc_state_offset())); // Now check if evacuation is in progress. + __ testb(gc_state, ShenandoahHeap::HAS_FORWARDED | ShenandoahHeap::EVACUATION); + __ jcc(Assembler::zero, done); + + // Heap is unstable, need to perform the read-barrier even if WB is inactive interpreter_read_barrier_not_null(masm, dst); + __ testb(gc_state, ShenandoahHeap::EVACUATION); __ jcc(Assembler::zero, done); __ push(rscratch1); __ push(rscratch2); __ movptr(rscratch1, dst);
< prev index next >