This is the mail archive of the
mailing list for the GDB project.
Re: [patch] Handle return small struct in rs600 (size is not 4/8)
On 08/16/2011 02:54 AM, Andreas Schwab wrote:
> Yao Qi <firstname.lastname@example.org> 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, thanks for your clarification. Please ignore my patch, and
sorry for the noise.