RFR: Fix x86_32 builds and tests

Roman Kennke rkennke at redhat.com
Fri Aug 16 08:40:43 UTC 2019


Yes, please.

Thanks,
Roman

> x86_32 is broken in sh/jdk, because it partially reverses the fixes we had in jdk/jdk. We need to
> get them back like this:
> 
> diff -r b21a87c00c5d src/hotspot/cpu/x86/gc/shenandoah/shenandoahBarrierSetAssembler_x86.cpp
> --- a/src/hotspot/cpu/x86/gc/shenandoah/shenandoahBarrierSetAssembler_x86.cpp   Thu Aug 15 20:10:59
> 2019 +0200
> +++ b/src/hotspot/cpu/x86/gc/shenandoah/shenandoahBarrierSetAssembler_x86.cpp   Fri Aug 16 09:54:11
> 2019 +0200
> @@ -855,10 +855,17 @@
>    // Check for object being in the collection set.
>    __ mov(tmp1, res);
>    __ shrptr(tmp1, ShenandoahHeapRegion::region_size_bytes_shift_jint());
>    __ movptr(tmp2, (intptr_t) ShenandoahHeap::in_cset_fast_test_addr());
> +#ifdef _LP64
>    __ movbool(tmp2, Address(tmp2, tmp1, Address::times_1));
>    __ testbool(tmp2);
> +#else
> +  // On x86_32, C1 register allocator can give us the register without 8-bit support.
> +  // Do the full-register access and test to avoid compilation failures.
> +  __ movptr(tmp2, Address(tmp2, tmp1, Address::times_1));
> +  __ testptr(tmp2, 0xFF);
> +#endif
>    __ jcc(Assembler::zero, *stub->continuation());
> 
>    __ bind(slow_path);
>    ce->store_parameter(res, 0);
> @@ -932,15 +939,23 @@
>    __ prologue("shenandoah_load_reference_barrier", false);
>    // arg0 : object to be resolved
> 
>    __ save_live_registers_no_oop_map(true);
> +
> +#ifdef _LP64
>    __ load_parameter(0, c_rarg0);
>    __ load_parameter(1, c_rarg1);
>    if (UseCompressedOops) {
>      __ call_VM_leaf(CAST_FROM_FN_PTR(address,
> ShenandoahRuntime::load_reference_barrier_fixup_narrow), c_rarg0, c_rarg1);
>    } else {
>      __ call_VM_leaf(CAST_FROM_FN_PTR(address, ShenandoahRuntime::load_reference_barrier_fixup),
> c_rarg0, c_rarg1);
>    }
> +#else
> +  __ load_parameter(0, rax);
> +  __ load_parameter(1, rbx);
> +  __ call_VM_leaf(CAST_FROM_FN_PTR(address, ShenandoahRuntime::load_reference_barrier_fixup), rax,
> rbx);
> +#endif
> +
>    __ restore_live_registers_except_rax(true);
> 
>    __ epilogue();
>  }
> 
> Testing: {x86_32, x86_64} hotspot_gc_shenandoah
> 



More information about the shenandoah-dev mailing list