This is the mail archive of the gdb-patches@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]

Re: [rfa] mips argument passing fixes for o32



>> I don't think this change is right.  In little endian mode, a one byte 
>> struct will end up being stored at A+4 instead of A.
>> 
>> Which failures did it appear to fix?  Which endian is MIPS/Linux?
> 
> 
> MIPS/Linux can be either big or little endian; the failure was on
> little endian.
> 
> The effect is to store a one byte struct at A+3 (not A+4); this matches
> what at least GCC does from what I can tell, and the comment in GCC
> says that SGI compilers do the same.


(A+3, yes, sorry).

The SGI compilers are big endian (correct?) so who knows what they would 
do in the little endian case.


> The testcase was the passing of a three_char_t in call-ar-st (calling
> print_three_chars from the gdb prompt).


This is going to take more digging.  It smells like a GCC bug.  It is 
definitly inconsistent with other ABIs where the struct is always stored 
at A and not A+3.

	Andrew


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