Re: [patch] Handle return small struct in rs600 (size is not 4/8)

Andreas Schwab
2011-08-15T18:54:39Z

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."