[foreign-memaccess+abi] Integrated: 8295290: Add Windows ARM64 ABI support to the Foreign Function & Memory API

Saint Wesonga duke at openjdk.org
Wed Jan 11 04:26:51 UTC 2023


On Tue, 22 Nov 2022 19:01:32 GMT, Saint Wesonga <duke at openjdk.org> wrote:

> There are 2 primary differences between the Windows ARM64 ABI and the macOS/Linux ARM64 ABI: variadic floating point arguments are passed in general purpose registers on Windows (instead of the vector registers). In addition to this, up to 64 bytes of a struct being passed to a variadic function can be placed in general purpose registers. This happens regardless of the type of struct (HFA or other generic struct). This means that a struct can be split across registers and the stack when invoking a variadic function.
> 
> This change introduces tests that compute the sum of the fields of structs containing 1-4 ints, floats, and doubles to verify that each field is correctly assigned a register or stack location when invoking a variadic function (both when the struct can be passed entirely in registers as well as when the struct spills onto the stack).
> 
> For details about the Foreign Function & Memory API, see JEP 434 defined at https://openjdk.org/jeps/434
> 
> The Windows ARM64 ABI conventions are documented at https://learn.microsoft.com/en-us/cpp/build/arm64-windows-abi-conventions
> 
> This work builds on @lewurm / Bernhard's branch at https://github.com/lewurm/openjdk/commits/foreign-windows-aarch64

This pull request has now been integrated.

Changeset: 08225e4f
Author:    Saint Wesonga <sawesong at microsoft.com>
Committer: Jorn Vernee <jvernee at openjdk.org>
URL:       https://git.openjdk.org/panama-foreign/commit/08225e4f5e00837e974098a933f27267f3c0dbc5
Stats:     737 lines in 15 files changed: 710 ins; 1 del; 26 mod

8295290: Add Windows ARM64 ABI support to the Foreign Function & Memory API

Reviewed-by: jvernee

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

PR: https://git.openjdk.org/panama-foreign/pull/754


More information about the panama-dev mailing list