summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAnthony Green <green@moxielogic.com>2022-05-29 11:22:38 -0400
committerAnthony Green <green@moxielogic.com>2022-05-29 11:22:38 -0400
commitc528d5b45e248f47b5af6f16bfcafc779b196ed1 (patch)
treeceac010d88fbb2b2e8e5a0784ef92bd042d4dc24 /src
parentaa2c4141722ec8b8b014b97e049ffa2d140d0c0d (diff)
downloadlibffi-c528d5b45e248f47b5af6f16bfcafc779b196ed1.tar.gz
Fix windows arg passing
Diffstat (limited to 'src')
-rw-r--r--src/x86/ffiw64.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/x86/ffiw64.c b/src/x86/ffiw64.c
index 81d41bf..263aa5b 100644
--- a/src/x86/ffiw64.c
+++ b/src/x86/ffiw64.c
@@ -125,7 +125,6 @@ ffi_call_int (ffi_cif *cif, void (*fn)(void), void *rvalue,
struct win64_call_frame *frame;
ffi_type **arg_types = cif->arg_types;
int nargs = cif->nargs;
- const int max_reg_struct_size = cif->abi == FFI_GNUW64 ? 8 : 16;
FFI_ASSERT(cif->abi == FFI_GNUW64 || cif->abi == FFI_WIN64);
@@ -135,7 +134,7 @@ ffi_call_int (ffi_cif *cif, void (*fn)(void), void *rvalue,
{
ffi_type *at = arg_types[i];
int size = at->size;
- if (at->type == FFI_TYPE_STRUCT && size > max_reg_struct_size)
+ if (at->type == FFI_TYPE_STRUCT && size > 8)
{
char *argcopy = alloca (size);
memcpy (argcopy, avalue[i], size);