Commit f55d7ff1a24e9c678dac3397175772a9914c02b0

Anthony Green 2022-05-28T14:30:13

moxie: structs > 8 go on stack

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/src/moxie/ffi.c b/src/moxie/ffi.c
index 9d71673..12e4975 100644
--- a/src/moxie/ffi.c
+++ b/src/moxie/ffi.c
@@ -151,7 +151,7 @@ void ffi_call(ffi_cif *cif,
     {
       ffi_type *at = arg_types[i];
       int size = at->size;
-      if (at->type == FFI_TYPE_STRUCT && size > 16)
+      if (at->type == FFI_TYPE_STRUCT && size > 8)
         {
           char *argcopy = alloca (size);
           memcpy (argcopy, avalue[i], size);