[lworld] Integrated: 8254219: [lworld] Remove reserved entries from the calling convention

Tobias Hartmann thartmann at openjdk.java.net
Thu Oct 8 12:31:55 UTC 2020


On Thu, 8 Oct 2020 08:04:23 GMT, Tobias Hartmann <thartmann at openjdk.org> wrote:

> 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

This pull request has now been integrated.

Changeset: ea780c91
Author:    Tobias Hartmann <thartmann at openjdk.org>
URL:       https://git.openjdk.java.net/valhalla/commit/ea780c91
Stats:     743 lines in 25 files changed: 61 ins; 459 del; 223 mod

8254219: [lworld] Remove reserved entries from the calling convention

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

PR: https://git.openjdk.java.net/valhalla/pull/214



More information about the valhalla-dev mailing list