summaryrefslogtreecommitdiff
path: root/src/aarch64/ffi.c
diff options
context:
space:
mode:
authorRichard Henderson <rth@redhat.com>2014-10-22 23:48:12 -0400
committerRichard Henderson <rth@twiddle.net>2014-11-12 09:29:32 +0100
commit0e41c73b092064e986d484270a13046479d6bda3 (patch)
tree9b3dc041eadeb1ecddb220720d506b4cd0e2befe /src/aarch64/ffi.c
parenta992f8789b5202ca180e67b16b47ee834160665c (diff)
downloadlibffi-0e41c73b092064e986d484270a13046479d6bda3.tar.gz
aarch64: Move x8 out of call_context
Reduces stack size. It was only used by the closure, and there are available argument registers.
Diffstat (limited to 'src/aarch64/ffi.c')
-rw-r--r--src/aarch64/ffi.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/aarch64/ffi.c b/src/aarch64/ffi.c
index 4f85140..f546ab2 100644
--- a/src/aarch64/ffi.c
+++ b/src/aarch64/ffi.c
@@ -52,7 +52,6 @@ struct call_context
{
struct _v v[N_V_ARG_REG];
UINT64 x[N_X_ARG_REG];
- UINT64 x8;
};
#if defined (__clang__) && defined (__APPLE__)
@@ -766,7 +765,7 @@ ffi_closure_SYSV_inner (ffi_cif *cif,
void (*fun)(ffi_cif*,void*,void**,void*),
void *user_data,
struct call_context *context,
- void *stack, void *rvalue)
+ void *stack, void *rvalue, void *struct_rvalue)
{
void **avalue = (void**) alloca (cif->nargs * sizeof (void*));
int i, h, nargs, flags;
@@ -861,7 +860,7 @@ ffi_closure_SYSV_inner (ffi_cif *cif,
flags = cif->flags;
if (flags & AARCH64_RET_IN_MEM)
- rvalue = (void *)(uintptr_t)context->x8;
+ rvalue = struct_rvalue;
fun (cif, rvalue, avalue, user_data);