RFR: 8303409: Add Windows AArch64 ABI support to the Foreign Function & Memory API

Saint Wesonga duke at openjdk.org
Wed Mar 1 23:21:18 UTC 2023


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. The Windows ARM64 ABI conventions are documented at https://learn.microsoft.com/en-us/cpp/build/arm64-windows-abi-conventions

For details about the Foreign Function & Memory API, see JEP 434 at https://openjdk.org/jeps/434

This change is a cherry pick of https://github.com/openjdk/panama-foreign/commit/d379ca1c and https://github.com/openjdk/panama-foreign/commit/08225e4f from https://github.com/openjdk/panama-foreign/pull/754 and includes an additional commit that introduces a VaList implementation for Windows on AArch64.

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

Commit messages:
 - Add Windows AArch64 VaList implementation
 - 8295290: Add Windows ARM64 ABI support to the Foreign Function & Memory API
 - Move Linux & MacOs CallArranger tests into separate files

Changes: https://git.openjdk.org/jdk/pull/12773/files
 Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=12773&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8303409
  Stats: 2135 lines in 20 files changed: 1445 ins; 650 del; 40 mod
  Patch: https://git.openjdk.org/jdk/pull/12773.diff
  Fetch: git fetch https://git.openjdk.org/jdk pull/12773/head:pull/12773

PR: https://git.openjdk.org/jdk/pull/12773


More information about the hotspot-compiler-dev mailing list