This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
RE: sh4 abi doc
- From: "Clarke, Stephen" <stephen dot clarke at superh dot com>
- To: "Elena Zannoni" <ezannoni at redhat dot com>
- Cc: <gdb at sources dot redhat dot com>
- Date: Thu, 26 Sep 2002 11:47:15 -0700
- Subject: RE: sh4 abi doc
> 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.