RFR: 8229470: Shenandoah: Fix C1 getAndSetObject() failure

Aleksey Shipilev shade at redhat.com
Tue Aug 13 12:48:02 UTC 2019


On 8/13/19 1:28 PM, Roman Kennke wrote:
>>> Fix:
>>> http://cr.openjdk.java.net/~rkennke/JDK-8229470/webrev.00/
>>> Testing: failed testcase, hotspot_gc_shenandoah
>>
>> It fixes the failure for me.
>>
>> But how does this fix work? Does that failure happen at pre_barrier path? If so, should it be moved
>> under ShenandoahSATBBarrier branch, or into the pre_barrier itself?
> 
> The intrinsic code doesn't like a physical register in set_result().
> However, yesterday I changed to:
> 
>   LIR_Opr result = gen->result_register_for(obj->value_type());
> 
> in load_reference_barrier(), which allocates a physical reg (rax on x86,
> r0 on aarch64). This is done so that we have the result reg in the right
> place for the runtime call, which returns the oop in that register. This
> avoids some register shuffling in the LRB stub. However, it doesn't work
> for xchg, and this fix allocates a (virtual) tmp reg, and copies the
> result into that. 

OK, fine.

-- 
Thanks,
-Aleksey



More information about the shenandoah-dev mailing list