RFR: 8337780: RISC-V: C2: Change C calling convention for sp to NS
Feilong Jiang
fjiang at openjdk.org
Sat Aug 3 16:24:40 UTC 2024
Hi, please review this patch that changes the C calling convention for sp to NS as we have already saved/restored sp in `enter()`/`leave()`.
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
-------------
Commit messages:
- make sp C convention save type as NS
Changes: https://git.openjdk.org/jdk/pull/20449/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=20449&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8337780
Stats: 2 lines in 1 file changed: 0 ins; 0 del; 2 mod
Patch: https://git.openjdk.org/jdk/pull/20449.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/20449/head:pull/20449
PR: https://git.openjdk.org/jdk/pull/20449
More information about the hotspot-compiler-dev
mailing list