This is the mail archive of the
libffi-discuss@sourceware.org
mailing list for the libffi project.
Re: [PATCH 3/8] sparc: Rewrite everything
- From: David Miller <davem at davemloft dot net>
- To: rth at twiddle dot net
- Cc: libffi-discuss at sourceware dot org
- Date: Wed, 29 Oct 2014 14:10:27 -0400 (EDT)
- Subject: Re: [PATCH 3/8] sparc: Rewrite everything
- Authentication-results: sourceware.org; auth=none
- References: <1414525555-21256-1-git-send-email-rth at twiddle dot net> <1414525555-21256-4-git-send-email-rth at twiddle dot net>
From: Richard Henderson <rth@twiddle.net>
Date: Tue, 28 Oct 2014 12:45:50 -0700
> + case FFI_TYPE_STRUCT:
> + if (rtype->size > 32)
> + {
> + flags = SPARC_RET_VOID | SPARC_FLAG_RET_IN_MEM;
> + bytes = 8;
> + }
> + else
> + flags = SPARC_RET_STRUCT;
> + break;
Here you use a cutoff of 32 bytes.
> + case FFI_TYPE_LONGDOUBLE:
> + case FFI_TYPE_STRUCT:
> + z = ty->size;
> + if (z > 16)
> + {
> + /* For structures larger than 16 bytes we pass reference. */
> + *argp++ = (unsigned long)a;
> + break;
> + }
> + if (((unsigned long)argp & 15) && ty->alignment > 8)
> + argp++;
> + memcpy(argp, a, z);
> + argp += ALIGN(z, 8) / 8;
> + break;
Yet here in args prep, the cutoff is 16.
Maybe I'm missing something?