[foreign-memaccess+abi] Integrated: 8275644: Replace VMReg in shuffling code with something more fine grained.
Jorn Vernee
jvernee at openjdk.org
Wed Sep 7 16:39:49 UTC 2022
On Fri, 5 Aug 2022 15:49:27 GMT, Jorn Vernee <jvernee at openjdk.org> wrote:
> This patch replaces `VMReg` with a new `VMStorage` class in the C++ code, which can be used to represent stack arguments of different sizes, as well as allowing finer grained stack addressing.
>
> The old masm code that used `VMReg` for moving values is also replaced with new code that uses `VMStorage`. And `VMReg` is changed to `VMStorage` everywhere.
>
> The `vmstorageBase` class was added in C++ to mirror the `jdk.internal.foreign.VMStorage`. That class now also has an additional field to encode the size of a stack argument, or a register mask, which can also be used to encode the size of a register argument. This also leads to some stubs needing to be updated on unsupported platforms.
>
> Lastly, instead of encoding stack indexes as 64-bit slots as we did before, they are now encoded as byte offsets, which allows finer grained stack addressing. (this leads to a bunch of values being multiplied by 8 in the Java code as well).
>
> ---
>
> This change is needed to address https://bugs.openjdk.org/browse/JDK-8275584 as well as adding support for `long double` as well as more exotic ABIs that take arguments as vectors.
This pull request has now been integrated.
Changeset: 123463f9
Author: Jorn Vernee <jvernee at openjdk.org>
URL: https://git.openjdk.org/panama-foreign/commit/123463f9ffdf39e1570e9b1063c8b5fb2dfd9371
Stats: 1418 lines in 46 files changed: 797 ins; 130 del; 491 mod
8275644: Replace VMReg in shuffling code with something more fine grained.
Reviewed-by: mcimadamore, ngasson
-------------
PR: https://git.openjdk.org/panama-foreign/pull/699
More information about the panama-dev
mailing list