Skip to content

Commit 0005ab6

Browse files
committed
8229709: x86_32 build and test failures after JDK-8228369 (Shenandoah: Refactor LRB C1 stubs)
Reviewed-by: rkennke
1 parent a572017 commit 0005ab6

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

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

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -807,16 +807,29 @@ void ShenandoahBarrierSetAssembler::gen_load_reference_barrier_stub(LIR_Assemble
807807
__ mov(tmp1, res);
808808
__ shrptr(tmp1, ShenandoahHeapRegion::region_size_bytes_shift_jint());
809809
__ movptr(tmp2, (intptr_t) ShenandoahHeap::in_cset_fast_test_addr());
810+
#ifdef _LP64
810811
__ movbool(tmp2, Address(tmp2, tmp1, Address::times_1));
811812
__ testbool(tmp2);
813+
#else
814+
// On x86_32, C1 register allocator can give us the register without 8-bit support.
815+
// Do the full-register access and test to avoid compilation failures.
816+
__ movptr(tmp2, Address(tmp2, tmp1, Address::times_1));
817+
__ testptr(tmp2, 0xFF);
818+
#endif
812819
__ jcc(Assembler::zero, *stub->continuation());
813820

814821
// Test if object is resolved.
815822
__ movptr(tmp1, Address(res, oopDesc::mark_offset_in_bytes()));
816823
// Test if both lowest bits are set. We trick it by negating the bits
817824
// then test for both bits clear.
818825
__ notptr(tmp1);
826+
#ifdef _LP64
819827
__ testb(tmp1, markOopDesc::marked_value);
828+
#else
829+
// On x86_32, C1 register allocator can give us the register without 8-bit support.
830+
// Do the full-register access and test to avoid compilation failures.
831+
__ testptr(tmp1, markOopDesc::marked_value);
832+
#endif
820833
__ jccb(Assembler::notZero, slow_path);
821834
// Clear both lower bits. It's still inverted, so set them, and then invert back.
822835
__ orptr(tmp1, markOopDesc::marked_value);
@@ -898,8 +911,8 @@ void ShenandoahBarrierSetAssembler::generate_c1_load_reference_barrier_runtime_s
898911
// arg0 : object to be resolved
899912

900913
__ save_live_registers_no_oop_map(true);
901-
__ load_parameter(0, c_rarg0);
902-
__ call_VM_leaf(CAST_FROM_FN_PTR(address, ShenandoahRuntime::load_reference_barrier), c_rarg0);
914+
__ load_parameter(0, LP64_ONLY(c_rarg0) NOT_LP64(rax));
915+
__ call_VM_leaf(CAST_FROM_FN_PTR(address, ShenandoahRuntime::load_reference_barrier), LP64_ONLY(c_rarg0) NOT_LP64(rax));
903916
__ restore_live_registers_except_rax(true);
904917

905918
__ epilogue();

0 commit comments

Comments
 (0)