This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: sh4 abi doc


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]