File tree 1 file changed +7
-1
lines changed
1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -2047,14 +2047,20 @@ public FFIType(Structure ref) {
2047
2047
size = sf .size ;
2048
2048
}
2049
2049
}
2050
- if ((! Platform .isWindows ()) && Platform .isIntel () && Platform .is64Bit ()) {
2050
+ if ( (! Platform .isWindows ()) && (
2051
+ (Platform .isIntel () && Platform .is64Bit ())
2052
+ || (Platform .isARM ())
2053
+ )) {
2051
2054
// System V x86-64 ABI requires, that in a union aggregate,
2052
2055
// that contains Integer and Double members, the parameters
2053
2056
// must be passed in the integer registers. I.e. in the case
2054
2057
// where the java side declares double and int members, the
2055
2058
// wrong FFI Type would be found, because the doubles size
2056
2059
// is larger than the int member, but the wrong parameter
2057
2060
// passing method would be used.
2061
+ //
2062
+ // It was observed, that the same behaviour is visible on
2063
+ // arm/aarch64.
2058
2064
if (hasInteger && isFloatType (unionType )) {
2059
2065
unionType = new FFIType (unionType );
2060
2066
if (unionType .size .intValue () == 4 ) {
You can’t perform that action at this time.
0 commit comments