RFR: 8312522: Implementation of Foreign Function & Memory API [v10]
Jorn Vernee
jvernee at openjdk.org
Wed Sep 6 10:54:48 UTC 2023
On Tue, 5 Sep 2023 21:01:00 GMT, Paul Sandoz <psandoz at openjdk.org> wrote:
>> Jorn Vernee has updated the pull request incrementally with five additional commits since the last revision:
>>
>> - 8315096: Allowed access modes in memory segment should depend on layout alignment
>>
>> Reviewed-by: psandoz
>> - Add missing @implSpec to AddressLayout
>>
>> Reviewed-by: pminborg
>> - Fix misc typos in FFM API javadoc
>>
>> Reviewed-by: jvernee
>> - Clarify javadoc w.r.t. exceptions thrown by a memory access var handle (part two)
>>
>> Reviewed-by: pminborg
>> - Clarify javadoc w.r.t. exceptions thrown by a memory access var handle
>>
>> Reviewed-by: jvernee
>
> src/java.base/share/classes/java/lang/foreign/Linker.java line 152:
>
>> 150: * <p>
>> 151: * The following table shows some examples of how C types are modelled in Linux/x64 (all the examples provided
>> 152: * here will assume these platform-dependent mappings):
>
> Up to you, but it might be useful to link to the ABI specifications if the links are considered stable.
There is this: https://refspecs.linuxbase.org/elf/x86_64-abi-0.99.pdf I'm not sure how stable this is. I don't think that website is an authoritative source. (at least, not to the degree it is for e.g. AArch64: https://github.com/ARM-software/abi-aa/blob/main/aapcs64/aapcs64.rst#595homogeneous-aggregates). Note also that is a draft. I think the final version is paywalled.
Alternatively, we could refer to the name only: "System V Application Binary Interface - AMD64 Architecture Processor Supplement" (or "x86-64 psABI")
Then people can google for themselves and find it. For instance, [this SO question](https://stackoverflow.com/a/40348010) points to a gitlab repo with a more up to date version: https://gitlab.com/x86-psABIs/x86-64-ABI/-/jobs/artifacts/master/raw/x86-64-ABI/abi.pdf?job=build
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/15103#discussion_r1317100703
More information about the build-dev
mailing list