RFR: 8075930: AARCH64: Use FP Register in C2
Zoltán Majó
zoltan.majo at oracle.com
Wed Mar 25 13:28:55 UTC 2015
Hi Ed,
On 03/25/2015 02:02 PM, Edward Nevill wrote:
> Hi,
>
> 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()).
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.
Does your change consider this aspect? Maybe running the tests in
jdk/test/java/lang/invoke/ could trigger some failures that are caused
by the FP not containing the SP of the caller of a method handle invocation.
Thank you and best regards,
Zoltan
>
> Recent testing on some micro benchmarks shows that this can have an adverse effect, both in terms of stack usage, and performance.
>
> The following webrev allows C2 to use the FP register.
>
> http://cr.openjdk.java.net/~enevill/8075930/webrev/
>
> I have run JTreg hotspot and langtools before and after this change with the following results:-
>
> Before:-
>
> hotspot: passed: 539, failed: 186, error: 87
> langtools: passed: 3193, error: 33
>
> After:-
>
> hotspot: passed: 540, failed: 186: error: 86
> langtools: passed: 3192, error: 34
>
> Please review this change and if OK, push.
>
> Thanks,
> Ed.
>
>
More information about the hotspot-dev
mailing list