[lworld] RFR: 8254219: [lworld] Remove reserved entries from the calling convention
Tobias Hartmann
thartmann at openjdk.java.net
Thu Oct 8 08:07:57 UTC 2020
When packing/unpacking inline type arguments to convert between the scalarized and the non-scalarized calling
conventions in the nmethod entry points, we may need to extend the stack. To save stack space, C2 re-uses the existing
stack slots and only extends the stack to fit additional fields. As a result, the original return address is in-between
and to avoid overwriting it by accident, we need "reserved entries" that are not used by the calling convention.
Similar to C1 (see JDK-8241764), we should extend the stack enough for unpacking to have its "own" stack space to lay
out arguments and get rid off all the ridiculous complexity that reserved entries require in the JIT. If necessary,
there are other ways to save stack space (for example, to allow overwriting the original return address and restore it
on return).
This fix is part of the "Calling Convention 2.0" umbrella (JDK-8254218) which aims to improve and simplify the
implementation of the scalarized calling convention.
Best regards,
Tobias
-------------
Commit messages:
- 8254219: [lworld] Remove reserved entries from the calling convention
Changes: https://git.openjdk.java.net/valhalla/pull/214/files
Webrev: https://webrevs.openjdk.java.net/?repo=valhalla&pr=214&range=00
Issue: https://bugs.openjdk.java.net/browse/JDK-8254219
Stats: 743 lines in 25 files changed: 61 ins; 459 del; 223 mod
Patch: https://git.openjdk.java.net/valhalla/pull/214.diff
Fetch: git fetch https://git.openjdk.java.net/valhalla pull/214/head:pull/214
PR: https://git.openjdk.java.net/valhalla/pull/214
More information about the valhalla-dev
mailing list