File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2047,14 +2047,20 @@ public FFIType(Structure ref) {
20472047 size = sf .size ;
20482048 }
20492049 }
2050- if ((! Platform .isWindows ()) && Platform .isIntel () && Platform .is64Bit ()) {
2050+ if ( (! Platform .isWindows ()) && (
2051+ (Platform .isIntel () && Platform .is64Bit ())
2052+ || (Platform .isARM ())
2053+ )) {
20512054 // System V x86-64 ABI requires, that in a union aggregate,
20522055 // that contains Integer and Double members, the parameters
20532056 // must be passed in the integer registers. I.e. in the case
20542057 // where the java side declares double and int members, the
20552058 // wrong FFI Type would be found, because the doubles size
20562059 // is larger than the int member, but the wrong parameter
20572060 // passing method would be used.
2061+ //
2062+ // It was observed, that the same behaviour is visible on
2063+ // arm/aarch64.
20582064 if (hasInteger && isFloatType (unionType )) {
20592065 unionType = new FFIType (unionType );
20602066 if (unionType .size .intValue () == 4 ) {
You can’t perform that action at this time.
0 commit comments