sh4 abi doc
Elena Zannoni
ezannoni@redhat.com
Thu Sep 26 12:45:00 GMT 2002
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.
Thanks
Elena
More information about the Gdb
mailing list