[foreign] RFR: 8223808: initial port for AArch64
Jorn Vernee
jbvernee at xs4all.nl
Tue May 28 09:57:06 UTC 2019
> * UnalignedStructTest - why doesn't it work? There's an f128 there but
> we're not actually reading/setting it - it's mostly there to force
> alignment a certain way
I noticed it's disabled on Windows as well, but as you say, this is not
really needed. There will however be some mismatch between the Java
layout and the native one, since the size of long double is not
consistent. A more canonical way to add manual padding is to use
anonymous bitfields:
struct unaligned {
long long: 64;
long long: 64;
short i1;
short i2;
//padding here?
};
That, plus adding the EXPORT macro to the functions, and replacing the
f128 in the layout with x128 (for clarity) works for me (I can upload a
webrev if wanted).
Cheers,
Jorn
[1] : http://hg.openjdk.java.net/panama/dev/rev/3a85acb09a77#l34.2
Maurizio Cimadamore schreef op 2019-05-28 10:48:
> Looks very good. Some questions/comments:
>
> * don't you need some extra set of constants under NativeTypes (for
> aarch platform?)
>
> * UnalignedStructTest - why doesn't it work? There's an f128 there but
> we're not actually reading/setting it - it's mostly there to force
> alignment a certain way
>
> * the change to DirectSignatureShuffler is subtle, but I think it's ok
> and shouldn't impact SysV negatively
>
> The rest looks good
>
> Maurizio
>
>
> On 28/05/2019 08:34, Nick Gasson wrote:
>> Hi all,
>>
>> I've put an updated webrev for the AArch64 port here:
>>
>> http://cr.openjdk.java.net/~ngasson/foreign/8223808/webrev.2/
>>
>> This contains all the previous changes plus a few fixes to handle
>> things
>> like "heterogeneous float aggregates" (structs/arrays where all the
>> members are float/double), which are handled specially in the ABI.
>>
>> With this patch all the tests in the jdk_foreign group pass on
>> AArch64,
>> except the two I disabled pending adding long double support.
>>
>> Please let me know if you have any feedback!
>>
>> Thanks,
>> Nick
More information about the panama-dev
mailing list