RFR: 8255886: Shenandoah: Avoid register clash when calling LRB-runtime from interpreter [v4]

Aleksey Shipilev shade at openjdk.java.net
Wed Nov 4 17:45:57 UTC 2020


On Wed, 4 Nov 2020 17:23:04 GMT, Roman Kennke <rkennke at openjdk.org> wrote:

>> JDK-8255762 caused test failure on Windows because of overlapping argument registers in the LRB runtime call. The problem is more general, though, but hasn't manifested anywhere else.
>> 
>> Testing: hotspot_gc_shenandoah (linux: x86_64, x86_32, windows: x86_64)
>
> Roman Kennke has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Use 2-register form of cset-check, MacOSX doesn't allocate cset-table in location for 32bit-addressing

Minor nits

src/hotspot/cpu/x86/gc/shenandoah/shenandoahBarrierSetAssembler_x86.cpp line 297:

> 295:   if (kind == ShenandoahBarrierSet::AccessKind::NORMAL) {
> 296:     // Test for object in cset
> 297:     // Allocate tmp-reg.

"Allocate temporary registers" now.

src/hotspot/cpu/x86/gc/shenandoah/shenandoahBarrierSetAssembler_x86.cpp line 312:

> 310:     __ push(tmp2);
> 311:     assert_different_registers(tmp1, src.base(), src.index());
> 312:     assert_different_registers(tmp1, dst);

Let's do:

    assert(tmp1 != noreg, "tmp1 allocated");
    assert(tmp2 != noreg, "tmp2 allocated");
    assert_different_registers(tmp1, tmp2, src.base(), src.index());
    assert_different_registers(tmp1, tmp2, dst);

    __ push(tmp1);
    __ push(tmp2);

-------------

Changes requested by shade (Reviewer).

PR: https://git.openjdk.java.net/jdk/pull/1054


More information about the shenandoah-dev mailing list