RFR: 8314949: linux PPC64 Big Endian: Implementation of Foreign Function & Memory API
Martin Doerr
mdoerr at openjdk.org
Fri Aug 25 08:04:10 UTC 2023
On Thu, 24 Aug 2023 23:38:42 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:
>> I've found a way to solve the remaining FFI problem on linux PPC64 Big Endian. Large structs (>8 Bytes) which are passed in registers or on stack require shifting the Bytes in the last slot if the size is not a multiple of 8. This PR adds the required functionality to the Java code.
>>
>> Please review and provide feedback. There may be better ways to implement it. I just found one which works and makes the tests pass:
>>
>> Test summary
>> ==============================
>> TEST TOTAL PASS FAIL ERROR
>> jtreg:test/jdk/java/foreign 88 88 0 0
>>
>>
>> Note: This PR should be considered as preparation work for AIX which also uses ABIv1.
>
> Overall these changes look good - as commented I'd like to learn a bit more of the underlying ABI, to get a sense of whether adding a new binding is ok. But overall it's great to see support for a big-endian ABI - apart from the linker, I am pleased to see that you did not encounter too many issues in the memory-side of the FFM API.
@mcimadamore: Thanks for your feedback! Jorn and I had resolved the other issues already when we have worked on the linux little endian part. It already contains some ABIv1 code. Note that we already have one big endian platform: s390. But that one doesn't pass structs >8 Bytes in registers.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/15417#issuecomment-1692938709
More information about the hotspot-compiler-dev
mailing list