{
struct _v v[N_V_ARG_REG];
UINT64 x[N_X_ARG_REG];
- UINT64 x8;
};
#if defined (__clang__) && defined (__APPLE__)
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;
flags = cif->flags;
if (flags & AARCH64_RET_IN_MEM)
- rvalue = (void *)(uintptr_t)context->x8;
+ rvalue = struct_rvalue;
fun (cif, rvalue, avalue, user_data);
stp x2, x3, [sp, #16 + 16*N_V_ARG_REG + 16]
stp x4, x5, [sp, #16 + 16*N_V_ARG_REG + 32]
stp x6, x7, [sp, #16 + 16*N_V_ARG_REG + 48]
- str x8, [sp, #16 + 16*N_V_ARG_REG + 64]
/* Load ffi_closure_inner arguments. */
ldp x0, x1, [x17, #FFI_TRAMPOLINE_SIZE] /* load cif, fn */
add x3, sp, #16 /* load context */
add x4, sp, #ffi_closure_SYSV_FS /* load stack */
add x5, sp, #16+CALL_CONTEXT_SIZE /* load rvalue */
+ mov x6, x8 /* load struct_rval */
bl CNAME(ffi_closure_SYSV_inner)
/* Load the return value as directed. */