Commit aebf2c3023b5ff056a708dc34169f7b549b2ec4f

Ole André Vadla Ravnås 2014-07-25T21:40:50

Fix alignment of FFI_TYPE_FLOAT for Apple's ARM64 ABI

1
2
3
4
5
6
7
8
9
10
11
12
13
14
diff --git a/src/aarch64/ffi.c b/src/aarch64/ffi.c
index b807a2d..10e95db 100644
--- a/src/aarch64/ffi.c
+++ b/src/aarch64/ffi.c
@@ -146,6 +146,9 @@ get_basic_type_alignment (unsigned short type)
   switch (type)
     {
     case FFI_TYPE_FLOAT:
+#if defined (__APPLE__)
+      return sizeof (UINT32);
+#endif
     case FFI_TYPE_DOUBLE:
       return sizeof (UINT64);
 #if FFI_TYPE_DOUBLE != FFI_TYPE_LONGDOUBLE