diff options
author | Armin Rigo <arigo@tunes.org> | 2013-07-18 21:32:25 +0200 |
---|---|---|
committer | Armin Rigo <arigo@tunes.org> | 2013-07-18 21:32:25 +0200 |
commit | d86209a14d3cafe13465707df8f0dc2b17ed5cf0 (patch) | |
tree | e73ce4dabdd36ca04fcbc1f8e0c2c63299a7387d /c/libffi_msvc | |
parent | 5bd79655f3252b26369e93d6f29bdbfa595d96c7 (diff) | |
download | cffi-d86209a14d3cafe13465707df8f0dc2b17ed5cf0.tar.gz |
Attempt a fix for Win64
Diffstat (limited to 'c/libffi_msvc')
-rw-r--r-- | c/libffi_msvc/ffi.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/c/libffi_msvc/ffi.c b/c/libffi_msvc/ffi.c index ab2cc9d..4296326 100644 --- a/c/libffi_msvc/ffi.c +++ b/c/libffi_msvc/ffi.c @@ -102,6 +102,15 @@ void ffi_prep_args(char *stack, extended_cif *ecif) FFI_ASSERT(0); } } +#ifdef _WIN64 + else if (z > 8) + { + /* On Win64, if a single argument takes more than 8 bytes, + then it is always passed by reference. */ + *(void **)argp = *p_argv; + z = 8; + } +#endif else { memcpy(argp, *p_argv, z); |