[foreign-memaccess+abi] RFR: 8255903: Enable multi-register return values for native invokers

Jorn Vernee jvernee at openjdk.java.net
Thu Oct 21 13:29:37 UTC 2021


Hi,

This patch implements support for multi-register returns in native invokers, and removes the buffered invocation strategy for downcalls. This is achieved, essentially, by using an in memory return: the caller allocates a bit of memory, and the native invoker stub writes the values of the return register to that memory. Then, the post processing code reads the register values back from there.

Currently, the target address of a downcall is handled separately from the other arguments. I initially implemented passing the IMR address the same way, but I realized the removal of the buffered invocation strategy affords us a better way of doing things: we can just make the target address and the IMR address part of the normal calling sequence, and remove a bunch of special-casing code to handle these. We now just use a binding recipe to unbox these arguments and shuffle them into registers, and the ABIDescriptor tells the native invoker stub which registers to pick up these arguments from.

Thanks,
Jorn

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

Commit messages:
 - Fix whitespace errors
 - Remove spurious import
 - AArch64 fixes
 - Fold more data into CallingSequence
 - Pass down target and imr addr regs through ABIDescriptor
 - handle target address and imr address in callingSequence
 - Remove downcall buffered invocation strategy
 - AArch64 changes
 - Implement MH specialization for multi-reg returns
 - Rebase Fixes
 - ... and 1 more: https://git.openjdk.java.net/panama-foreign/compare/b8d4b8a4...dba5efb2

Changes: https://git.openjdk.java.net/panama-foreign/pull/603/files
 Webrev: https://webrevs.openjdk.java.net/?repo=panama-foreign&pr=603&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8255903
  Stats: 1307 lines in 38 files changed: 422 ins; 601 del; 284 mod
  Patch: https://git.openjdk.java.net/panama-foreign/pull/603.diff
  Fetch: git fetch https://git.openjdk.java.net/panama-foreign pull/603/head:pull/603

PR: https://git.openjdk.java.net/panama-foreign/pull/603


More information about the panama-dev mailing list