From: Andrew Cagney <ac131313@redhat.com>
To: Elena Zannoni <ezannoni@redhat.com>
Cc: "Clarke, Stephen" <stephen.clarke@superh.com>, gdb@sources.redhat.com
Subject: Re: sh4 abi doc
Date: Thu, 26 Sep 2002 12:54:00 -0000 [thread overview]
Message-ID: <3D9365EF.3060904@redhat.com> (raw)
In-Reply-To: <15763.25405.302193.215110@localhost.redhat.com>
> Clarke, Stephen writes:
> > > From: Elena Zannoni [mailto:ezannoni@redhat.com]
> > > Sent: Thursday, September 26, 2002 10:43 AM
> > >
> > > The cutoff is 8 bytes.
> >
> > Yes: anything bigger than 8 bytes is definitely
> > returned in memory.
> >
> > But the cutoff is not "clean", because structs smaller
> > than this could also be returned in memory, if they
> > don't pass the "same size and alignment as an integer
> > type" rule.
> >
> > For example, in
> >
> > struct s { char c[3]; } wibble;
> > struct s foo(void) { return wibble; }
> >
> > the return value from foo() will be in memory, not
> > in R0, because there is no 3-byte integer type.
> >
> > Sorry if that was obvious already, I just wanted to
> > be sure.
> >
> > Steve.
>
>
> Very helpful. I hadn't noticed this variant, indeed.
Ah, the ``gcc struct return'' rule. Perhaphs we need a generic function
that specifies this.
enjoy,
Andrew
next prev parent reply other threads:[~2002-09-26 19:54 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-09-26 11:47 Clarke, Stephen
2002-09-26 12:45 ` Elena Zannoni
2002-09-26 12:54 ` Andrew Cagney [this message]
-- strict thread matches above, loose matches on Subject: below --
2002-09-26 10:33 Clarke, Stephen
2002-09-26 10:10 Clarke, Stephen
2002-09-26 10:18 ` Andrew Cagney
2002-09-26 10:46 ` Elena Zannoni
2002-09-26 9:17 Clarke, Stephen
2002-09-26 9:54 ` Elena Zannoni
2002-09-26 8:21 Elena Zannoni
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=3D9365EF.3060904@redhat.com \
--to=ac131313@redhat.com \
--cc=ezannoni@redhat.com \
--cc=gdb@sources.redhat.com \
--cc=stephen.clarke@superh.com \
/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