RFR: 8075930: AARCH64: Use FP Register in C2
Edward Nevill
edward.nevill at linaro.org
Wed Mar 25 16:59:43 UTC 2015
Hi Zoltán,
On Wed, 2015-03-25 at 14:28 +0100, Zoltán Majó wrote:
> On 03/25/2015 02:02 PM, Edward Nevill wrote:
> > The aarch64 C2 compiler makes no use of the FP register even though this register is saved on entry and restored on exit and is therefore always available for allocation.
>
> It seems to me that the C2 compiler currently saves the SP into FP on
> method handle invokes. This functionality is encoded by
> aarch64_enc_java_handle_call in aarch64.ad. C1 does the same (see usages
> of FrameMap::method_handle_invoke_SP_save_opr()).
Thanks! I had not spotted this usage.
If my understanding is correct, it does not need to be RFP in
aarch64_enc_java_handle_call. It could be any callee saved register? On
aarch64 r19..r28 are callee saved so we could use say r19 instead.
C1 and C2 are caller save, so they will not have any valid data in r19
at the point of the call (this is the problem with using RFP, because
RFP is not caller save).
>
> Stack walking relies on having the SP saved into FP for method handle
> invokes (e.g., in frame::adjust_unextended_sp()).
These would then need to be modified to recover the sp from r19.
Would this work?
All the best,
Ed.
More information about the hotspot-dev
mailing list