# HG changeset patch # User shade # Date 1589968904 -7200 # Wed May 20 12:01:44 2020 +0200 # Node ID b620b11f83d700c85d70ea8104fe37a1d7f92929 # Parent db19c7c917a263d58eca8200565c8950d5647791 8244729: Shenandoah: remove resolve paths from SBSA::generate_shenandoah_lrb Reviewed-by: XXX diff --git a/src/hotspot/cpu/aarch64/gc/shenandoah/shenandoahBarrierSetAssembler_aarch64.cpp b/src/hotspot/cpu/aarch64/gc/shenandoah/shenandoahBarrierSetAssembler_aarch64.cpp --- a/src/hotspot/cpu/aarch64/gc/shenandoah/shenandoahBarrierSetAssembler_aarch64.cpp +++ b/src/hotspot/cpu/aarch64/gc/shenandoah/shenandoahBarrierSetAssembler_aarch64.cpp @@ -683,23 +683,11 @@ StubCodeMark mark(cgen, "StubRoutines", "shenandoah_lrb"); address start = __ pc(); - Label work, done; + Label slow_path; __ mov(rscratch2, ShenandoahHeap::in_cset_fast_test_addr()); __ lsr(rscratch1, r0, ShenandoahHeapRegion::region_size_bytes_shift_jint()); __ ldrb(rscratch2, Address(rscratch2, rscratch1)); - __ tbnz(rscratch2, 0, work); - __ ret(lr); - __ bind(work); - - Label slow_path; - __ ldr(rscratch1, Address(r0, oopDesc::mark_offset_in_bytes())); - __ eon(rscratch1, rscratch1, zr); - __ ands(zr, rscratch1, markWord::lock_mask_in_place); - __ br(Assembler::NE, slow_path); - - // Decode forwarded object. - __ orr(rscratch1, rscratch1, markWord::marked_value); - __ eon(r0, rscratch1, zr); + __ tbnz(rscratch2, 0, slow_path); __ ret(lr); __ bind(slow_path); @@ -718,7 +706,6 @@ __ mov(r0, rscratch1); __ leave(); // required for proper stackwalking of RuntimeStub frame - __ bind(done); __ ret(lr); return start; diff --git a/src/hotspot/cpu/x86/gc/shenandoah/shenandoahBarrierSetAssembler_x86.cpp b/src/hotspot/cpu/x86/gc/shenandoah/shenandoahBarrierSetAssembler_x86.cpp --- a/src/hotspot/cpu/x86/gc/shenandoah/shenandoahBarrierSetAssembler_x86.cpp +++ b/src/hotspot/cpu/x86/gc/shenandoah/shenandoahBarrierSetAssembler_x86.cpp @@ -977,7 +977,7 @@ StubCodeMark mark(cgen, "StubRoutines", "shenandoah_lrb"); address start = __ pc(); - Label resolve_oop, slow_path; + Label slow_path; // We use RDI, which also serves as argument register for slow call. // RAX always holds the src object ptr, except after the slow call, @@ -995,25 +995,7 @@ __ movptr(tmp2, (intptr_t) ShenandoahHeap::in_cset_fast_test_addr()); __ movbool(tmp2, Address(tmp2, tmp1, Address::times_1)); __ testbool(tmp2); - __ jccb(Assembler::notZero, resolve_oop); - __ pop(tmp2); - __ pop(tmp1); - __ ret(0); - - // Test if object is already resolved. - __ bind(resolve_oop); - __ movptr(tmp2, Address(rax, oopDesc::mark_offset_in_bytes())); - // Test if both lowest bits are set. We trick it by negating the bits - // then test for both bits clear. - __ notptr(tmp2); - __ testb(tmp2, markWord::marked_value); __ jccb(Assembler::notZero, slow_path); - // Clear both lower bits. It's still inverted, so set them, and then invert back. - __ orptr(tmp2, markWord::marked_value); - __ notptr(tmp2); - // At this point, tmp2 contains the decoded forwarding pointer. - __ mov(rax, tmp2); - __ pop(tmp2); __ pop(tmp1); __ ret(0);