diff options
author | Anthony Green <green@moxielogic.com> | 2022-06-25 11:06:00 -0400 |
---|---|---|
committer | Anthony Green <green@moxielogic.com> | 2022-06-25 11:06:00 -0400 |
commit | fc8c8c1e2c31321b38dc079e549bc7748da4159d (patch) | |
tree | 9a905d95665a417ef3c85a97286b7974d5e0e317 /src/aarch64 | |
parent | b5abc4f6478147ce72fa6b2eb95296883d5ef3ef (diff) | |
download | libffi-fc8c8c1e2c31321b38dc079e549bc7748da4159d.tar.gz |
Fix ILP32 for aarch64
Diffstat (limited to 'src/aarch64')
-rw-r--r-- | src/aarch64/ffi.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/aarch64/ffi.c b/src/aarch64/ffi.c index f421536..76d2938 100644 --- a/src/aarch64/ffi.c +++ b/src/aarch64/ffi.c @@ -1027,9 +1027,18 @@ ffi_closure_SYSV_inner (ffi_cif *cif, { /* Replace Composite type of size greater than 16 with a pointer. */ +#ifdef __ILP32__ + UINT64 avalue_tmp; + memcpy (&avalue_tmp, + allocate_int_to_reg_or_stack (context, &state, + stack, sizeof (void *)), + sizeof (UINT64)); + avalue[i] = (void *)(UINT32)avalue_tmp; +#else avalue[i] = *(void **) allocate_int_to_reg_or_stack (context, &state, stack, sizeof (void *)); +#endif } else { |