[aarch64-port-dev ] RFR: 8231754: [JVMCI] Make r27 unconditionally reserved in JVMCI

Andrew Dinn adinn at redhat.com
Fri Oct 11 08:27:19 UTC 2019


> On 11/10/2019 07:47, dean.long at oracle.com wrote:
>> Wouldn't it be better to make r27 callee-saved in
>> cpu/aarch64/sharedRuntime_aarch64.cpp:RegisterSaver::save_live_registers()?

On 11/10/2019 08:55, Gilles Duboscq wrote:
> The idea was to first bring JVMCI in line with what the other compilers
> do (never allocate r27) and then investigate how we could make r27
> conditionally allocatable if there is interest.

I prefer Dean's suggestion. If I understand this patch correctly it
seems it was motivated by a desire to deal with the failure to mark r27
as callee-saved in save_live_registers when it has been made
allocatable. Bypassing that bug by disabling the optimization seems to
me to be a needless regression; why not just fix the bug? (also, see below).

n.b. I guess that also answers your speculation as to whether anyone is
interested in allocating conditionally -- we were interested enough some
time ago to implement this.

When you say 'other compilers' are you referring to the Graal JIT? Or is
there also a problem with C1 and/or C2? (or maybe some other JVMCI
compiler we don't yet know about? ;-).

If the problem is just that Graal cannot work safely when r27 is
allocatable then can we not change the condition for enabling use of r27
to include a test that JVMCI is disabled? (and fix the callee_saved
issue at the same time, of course :).

regards,


Andrew Dinn
-----------
Senior Principal Software Engineer
Red Hat UK Ltd
Registered in England and Wales under Company Registration No. 03798903
Directors: Michael Cunningham, Michael ("Mike") O'Neill, Eric Shander


More information about the aarch64-port-dev mailing list