Skip to content

[GITHUB-1118] Ensure union with floating point and integer member is passed in integer register#1122

Merged
matthiasblaesing merged 2 commits intojava-native-access:masterfrom
matthiasblaesing:x86-64-by-value-union
Sep 19, 2019
Merged

[GITHUB-1118] Ensure union with floating point and integer member is passed in integer register#1122
matthiasblaesing merged 2 commits intojava-native-access:masterfrom
matthiasblaesing:x86-64-by-value-union

Conversation

@matthiasblaesing
Copy link
Copy Markdown
Member

System V x86-64 ABI requires, that in a union aggregate, that contains
Integer and Double members, the parameters must be passed in the integer
registers. I.e. in the case where the java side declares double and int
members, the wrong FFI Type would be found, because the doubles size is
larger than the int member, but the wrong parameter passing method would
be used.

@matthiasblaesing
Copy link
Copy Markdown
Member Author

This PR is intended to fix #1118. @twall could you please have a look at this?

@matthiasblaesing
Copy link
Copy Markdown
Member Author

@twall ping?

…passed in integer register

System V x86-64 ABI requires, that in a union aggregate, that contains
Integer and Double members, the parameters must be passed in the integer
registers. I.e. in the case where the java side declares double and int
members, the wrong FFI Type would be found, because the doubles size is
larger than the int member, but the wrong parameter passing method would
be used.
@matthiasblaesing matthiasblaesing merged commit 09fdd8c into java-native-access:master Sep 19, 2019
@matthiasblaesing matthiasblaesing deleted the x86-64-by-value-union branch September 21, 2019 17:46
@matthiasblaesing matthiasblaesing mentioned this pull request Nov 15, 2020
10 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant