[foreign-memaccess+abi] Integrated: 8295265: Refactor handling of special values passed to stubs
Jorn Vernee
jvernee at openjdk.org
Fri Oct 14 15:40:31 UTC 2022
On Thu, 13 Oct 2022 09:20:13 GMT, Jorn Vernee <jvernee at openjdk.org> wrote:
> This patch refactors the handling of special values passed between stubs and Java code, such as the target address and the return buffer address.
>
> Currently the Java code determines some registers that these values are stored in. This refactor changes that to use placeholders, and lets the stub generation code fill in the actual locations. This allows more special values (such as locations to store preserved thread locals), as well as storing things to a location in the frame, as opposed to a register.
>
> To do this, this patch adds a Java enum and C++ helper class called StubLocations, which gives each special value an index (ordinal). The C++ helper class also has an array which maps this index to the actual location the stub gen code decides to use. This location is then used in shuffling code.
>
> Instead of the ABIDescriptor being used to determine a register for the target address and return buffer address, it now has 2 scratch registers, which don't conflict with arguments being passed. They can be used by the stub gen code.
>
> The patch also contains a minor renaming of a boolean value being used. I've also renamed StorageClasses, and RegType in Java and C++ code respectively to StorageType, to align the 2, since they also need to be kept in sync. The latter is responsible for a lot of changes in this patch.
>
> The stub gen code now also has a special FRAME_DATA storage type, which is used to indicate locations in the stub frame. This is for instance used to store the return buffer address.
This pull request has now been integrated.
Changeset: 15a1ec23
Author: Jorn Vernee <jvernee at openjdk.org>
URL: https://git.openjdk.org/panama-foreign/commit/15a1ec23efc74e5e483168cd8d75cabb0148e544
Stats: 553 lines in 36 files changed: 220 ins; 32 del; 301 mod
8295265: Refactor handling of special values passed to stubs
Reviewed-by: mcimadamore
-------------
PR: https://git.openjdk.org/panama-foreign/pull/740
More information about the panama-dev
mailing list