This is the mail archive of the gdb-patches@sourceware.org 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: [patch] Handle return small struct in rs600 (size is not 4/8)


Yao Qi <yao@codesourcery.com> writes:

> I think the description "shall be returned in r3 and r4, as if they were
> first stored in memory area and then the low-addressed word were loaded
> in r3 ...." is not very clear on the length of data.  In this case,
> struct C variable is returned, and its content is 0x61 0x62 0x63.  They
> (3 bytes) are stored in memory, and (3 bytes) are loaded into r3.  Since
> 3 bytes, not 4, are loaded to r3

When you load a (32-bit) register from memory, you always read 4 bytes.

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."


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