RFR: 8075930: AARCH64: Use FP Register in C2

Andrew Dinn adinn at redhat.com
Wed Mar 25 14:08:09 UTC 2015


On 25/03/15 13:28, 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()).

Yes, that's correct. aarch64_enc_java_handle relies on having FP
available to save SP. So, it looks like this fix will break that.

> Stack walking relies on having the SP saved into FP for method handle
> invokes (e.g., in frame::adjust_unextended_sp()).
> 
> Saving the SP into FP is not needed on some architectures (e.g., x86).
> I'm currently working on an enhancement that disables saving the SP into
> FP on x86 (see JDK-8068945). Maybe that could work for aarch64 as well.

I would certainly hope so. Can you please give the AArch64 devs a shout
when you propose a fix so we can help provide/review whatever
arch-specific changes are need for AArch64.

regards,


Andrew Dinn
-----------



More information about the hotspot-dev mailing list