This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [rfa] mips argument passing fixes for o32
On Thu, Jul 12, 2001 at 02:59:53PM -0400, Andrew Cagney wrote:
> The SGI compilers are big endian (correct?) so who knows what they would
> do in the little endian case.
There are other MIPS little-endian compilers, and:
> > 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.
If you read the original message at:
<http://sources.redhat.com/ml/gdb-patches/2001-07/msg00156.html>
you'll see the comment in GCC about this behavior. It says that
structures of less than word size will be passed in the high end of
registers, as a hack for compatibility with other MIPS compilers.
It would be interesting to see how other compilers actually handle
this, but I don't have access to any other little-endian MIPS
toolchains.
--
Daniel Jacobowitz Carnegie Mellon University
MontaVista Software Debian GNU/Linux Developer