[foreign-jextract] RFR: Use Windows and Aarch64 LongDouble constants in LayoutUtils

Jorn Vernee jvernee at openjdk.java.net
Mon Feb 24 18:37:45 UTC 2020


On Mon, 24 Feb 2020 17:05:06 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:

>> Hi,
>> 
>> Please review this small fix that lets LayoutUtils use the new LongDouble constants instead of Double on Windows and Aarch64 to initialize the global `C_LONGDOUBLE` value. Currently the use of Double results in an incorrect ABI attribute, causing a test failure.
> 
> Looks good - I guess I'm not sure of what is the failure you were seeing? Shouldn't DOUBLE and LONGDOUBLE be the same  on Win?

> 
> 
> Looks good - I guess I'm not sure of what is the failure you were seeing? Shouldn't DOUBLE and LONGDOUBLE be the same on Win?

As far as both being 64 bits yes, but now that we have the ABI type attribute this is different for DOUBLE and LONGDOUBLE. 

The particular check that is failing: https://github.com/openjdk/panama-foreign/blob/foreign-jextract/test/jdk/tools/jextract/testStruct/LibStructTest.java#L66

Since the actual Type that is found is `Type.DOUBLE`

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

PR: https://git.openjdk.java.net/panama-foreign/pull/27


More information about the panama-dev mailing list