From: Richard Henderson <rth@twiddle.net>
To: David Miller <davem@davemloft.net>
Cc: libffi-discuss@sourceware.org
Subject: Re: [PATCH 3/8] sparc: Rewrite everything
Date: Wed, 29 Oct 2014 20:01:00 -0000 [thread overview]
Message-ID: <545147A9.9090401@twiddle.net> (raw)
In-Reply-To: <20141029.141027.901195445453157818.davem@davemloft.net>
On 10/29/2014 11:10 AM, David Miller wrote:
> 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.
Return type.
>
>> + 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.
Parameter type.
> Maybe I'm missing something?
The two limits are in fact different. In gcc, see sparc_return_in_memory and
sparc_pass_by_reference.
r~
next prev parent reply other threads:[~2014-10-29 20:01 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-28 19:46 [PATCH 0/8] Go closures for Sparc Richard Henderson
2014-10-28 19:46 ` [PATCH 8/8] sparc: Re-add abi compliant structure support Richard Henderson
2014-10-28 19:46 ` [PATCH 3/8] sparc: Rewrite everything Richard Henderson
2014-10-29 18:10 ` David Miller
2014-10-29 20:01 ` Richard Henderson [this message]
2014-10-29 20:11 ` David Miller
2014-10-29 20:44 ` Richard Henderson
2014-10-30 4:52 ` David Miller
2014-10-28 19:46 ` [PATCH 1/8] sparc: Eliminate long double ifdefs Richard Henderson
2014-10-28 19:46 ` [PATCH 2/8] sparc: Tidy up symbols Richard Henderson
2014-10-28 19:46 ` [PATCH 4/8] sparc: Preprocess float point struct return Richard Henderson
2014-10-28 19:46 ` [PATCH 7/8] sparc: Add support for Go closures Richard Henderson
2014-10-28 19:46 ` [PATCH 6/8] sparc: Add support for complex types Richard Henderson
2014-10-28 19:46 ` [PATCH 5/8] sparc: Handle more cases of structure return directly Richard Henderson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=545147A9.9090401@twiddle.net \
--to=rth@twiddle.net \
--cc=davem@davemloft.net \
--cc=libffi-discuss@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).