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

Maurizio Cimadamore maurizio.cimadamore at oracle.com
Mon Feb 24 21:01:02 UTC 2020


On 24/02/2020 18:37, Jorn Vernee wrote:
> 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`

Ah ok - it's a jextract test; I thought some ABI-specific test was 
failing :-)

Maurizio

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


More information about the panama-dev mailing list