diff --git a/src/x86/ffi.c b/src/x86/ffi.c index cad32e8a0..73f69e095 100644 --- a/src/x86/ffi.c +++ b/src/x86/ffi.c @@ -177,7 +177,7 @@ ffi_prep_cif_machdep(ffi_cif *cif) bytes = FFI_ALIGN (bytes, t->alignment); bytes += FFI_ALIGN (t->size, FFI_SIZEOF_ARG); } - cif->bytes = FFI_ALIGN (bytes, 16); + cif->bytes = FFI_ALIGN (bytes, FFI_SIZEOF_ARG); return FFI_OK; } diff --git a/src/x86/ffiw64.c b/src/x86/ffiw64.c index f78752522..da44a0907 100644 --- a/src/x86/ffiw64.c +++ b/src/x86/ffiw64.c @@ -101,7 +101,7 @@ EFI64(ffi_prep_cif_machdep)(ffi_cif *cif) n += (flags == FFI_TYPE_STRUCT); if (n < 4) n = 4; - cif->bytes = n * 8; + cif->bytes = n * FFI_SIZEOF_ARG; return FFI_OK; }