RFR: JDK-8238851: Shenandoah: C1: Resolve into registers of correct type
rkennke at redhat.com
Wed Feb 12 14:21:12 UTC 2020
>>>> In ShBSC1::ensure_in_register() we are blindly creating registers of
>>>> type T_OBJECT, even though in some cases we actually need T_ADDRESS.
>>>> This blows up when we verify oop registers: when the argument is of type
>>>> T_OBJECT we perform extra checks that fail when the value in register is
>>>> not actually an object.
>>>> Testing: the provided testcase passes now. hotspot_gc_shenandoah
>>> This path probably needs adjustment too:
>>> 167 #ifdef AARCH64
>>> 168 // AArch64 expects double-size register.
>>> 169 obj_reg = gen->new_pointer_register();
>>> 170 #else
>> The provided test passes on aarch64 without any additional changes.
>> I tried removing the block, hoping that the suggested change does
>> perhaps make it unnecessary, but no. It's still needed.
> Gaawh. The non-AARCH64 path still looks good, so we can push it in current form. We really need to
> figure out AARCH64 thingie, please file the follow-up RFR?
Turns out that we can fix this rather easily. It is the non-aarch64 path
that is wrong though:
This is also consistent with the implementations of LIRAssembler::leal()
both x86 and aarch64.
Testing: passes hotspot_gc_shenandoah both aarch64 and x86
More information about the hotspot-gc-dev