[aarch64-port-dev ] RFR(M): 8233743: AArch64: Make r27 conditionally allocatable
Andrew Haley
aph at redhat.com
Fri Nov 15 14:49:14 UTC 2019
On 11/15/19 9:15 AM, Pengfei Li (Arm Technology China) wrote:
>>> This patch aligns with the implementation in [1] which makes the
>>> x86_64
>>> r12 register allocatable. Please let me know if I have missed anything
>>> for AArch64.
>>
>> We don't generally use r27 for compressed class pointers.
>
> Do you mean that r27 is only used for encoding/decoding oops but not for
> any klass pointers?
Almost always, yes.
> I looked at the AArch64 code and find it also used in
> MacroAssembler::encode_klass_not_null() if the compressed mode is
> not zero-based.
I see
if (use_XOR_for_compressed_class_base) {
if (CompressedKlassPointers::shift() != 0) {
eor(dst, src, (uint64_t)CompressedKlassPointers::base());
lsr(dst, dst, LogKlassAlignmentInBytes);
} else {
eor(dst, src, (uint64_t)CompressedKlassPointers::base());
}
return;
}
if (((uint64_t)CompressedKlassPointers::base() & 0xffffffff) == 0
&& CompressedKlassPointers::shift() == 0) {
movw(dst, src);
return;
}
... followed by code which does use r27.
Do you ever see r27 being used? If so, I'd be interested to know how
this gets triggered and what command-line arguments you use. It's
rather inefficient.
--
Andrew Haley (he/him)
Java Platform Lead Engineer
Red Hat UK Ltd. <https://www.redhat.com>
https://keybase.io/andrewhaley
EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671
More information about the hotspot-compiler-dev
mailing list