summaryrefslogtreecommitdiff
path: root/src/aarch64
diff options
context:
space:
mode:
authorOle André Vadla Ravnås <oleavr@gmail.com>2016-08-10 15:59:56 +0200
committerOle André Vadla Ravnås <oleavr@gmail.com>2016-08-10 17:05:00 +0200
commit301166b11e913f85d09f67af94264268811f23a9 (patch)
treebfe69cc8b419313cfaced584c68557c4673da018 /src/aarch64
parentf03ba2032850545dc6869bb495170a8c6cbf849d (diff)
downloadlibffi-301166b11e913f85d09f67af94264268811f23a9.tar.gz
aarch64: Fix handling of variadic closures on iOS
Diffstat (limited to 'src/aarch64')
-rw-r--r--src/aarch64/ffi.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/aarch64/ffi.c b/src/aarch64/ffi.c
index cf33abc..78328a8 100644
--- a/src/aarch64/ffi.c
+++ b/src/aarch64/ffi.c
@@ -917,6 +917,15 @@ ffi_closure_SYSV_inner (ffi_cif *cif,
default:
abort();
}
+
+#if defined (__APPLE__)
+ if (i + 1 == cif->aarch64_nfixedargs)
+ {
+ state.ngrn = N_X_ARG_REG;
+ state.nsrn = N_V_ARG_REG;
+ state.allocating_variadic = 1;
+ }
+#endif
}
flags = cif->flags;