RFR: 8337780: RISC-V: C2: Change C calling convention for sp to NS

Robbin Ehn rehn at openjdk.org
Mon Aug 5 08:42:31 UTC 2024


On Sat, 3 Aug 2024 16:17:53 GMT, Feilong Jiang <fjiang at openjdk.org> wrote:

> Hi, please review this patch that changes the C calling convention for sp to NS as sp is always saved and restored by the prolog/epilog code..
> This could reduce the frame size by 16 bytes for those C2 runtime stubs [1] as we do not have to save sp on the method entry.
> 
> I also checked the calling convention type for sp on other platforms (AArch64, PPC, x86, x64, S390), and they are all treated as NS.
> 
> 
> Testing:
> - [x] tier1~3 & hotspot:tier4 with release build
> 
> 1: https://github.com/openjdk/jdk/blob/367e0a65561f95aad61b40930d5f46843fee3444/src/hotspot/share/opto/runtime.cpp#L147-L167

Thanks!

-------------

Marked as reviewed by rehn (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/20449#pullrequestreview-2218376385


More information about the hotspot-compiler-dev mailing list