This is the mail archive of the
libffi-discuss@sourceware.org
mailing list for the libffi project.
Re: [PATCH 08/16] aarch64: Tidy up abi manipulation
- From: Andreas Schwab <schwab at linux-m68k dot org>
- To: Richard Henderson <rth at twiddle dot net>
- Cc: libffi-discuss at sourceware dot org, Richard Henderson <rth at redhat dot com>
- Date: Sun, 17 Sep 2017 16:24:43 +0200
- Subject: Re: [PATCH 08/16] aarch64: Tidy up abi manipulation
- Authentication-results: sourceware.org; auth=none
- References: <1414522393-19169-1-git-send-email-rth@twiddle.net> <1414522393-19169-9-git-send-email-rth@twiddle.net>
On Okt 28 2014, Richard Henderson <rth@twiddle.net> wrote:
> + case FFI_TYPE_STRUCT:
> + {
> + void *dest;
> + int elems;
> +
> + h = is_hfa (ty);
> + if (h)
> + {
> + do_hfa:
> + elems = h >> 8;
> + if (state.nsrn + elems <= N_V_ARG_REG)
> + {
> + dest = &context->v[state.nsrn];
> + state.nsrn += elems;
> + extend_hfa_type (dest, a, h);
> + break;
> + }
> + state.nsrn = N_V_ARG_REG;
> + dest = allocate_to_stack (&state, stack, ty->alignment, s);
> + }
> + else if (s > 16)
> + {
> + /* If the argument is a composite type that is larger than 16
> + bytes, then the argument has been copied to memory, and
> + the argument is replaced by a pointer to the copy. */
> + a = &avalue[i];
> + t = FFI_TYPE_POINTER;
> + goto do_pointer;
I don't see where the argument has been copied to memory. Doesn't that
need to call allocate_to_stack here?
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."