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
- To: Andrew Cagney <ac131313 at cygnus dot com>
- Subject: Re: [rfa] mips argument passing fixes for o32
- From: Daniel Jacobowitz <dmj+ at andrew dot cmu dot edu>
- Date: Thu, 12 Jul 2001 10:39:46 -0700
- Cc: gdb-patches at sources dot redhat dot com
- References: <20010706112635.A5870@nevyn.them.org> <3B4D5E95.6010407@cygnus.com>
On Thu, Jul 12, 2001 at 04:23:49AM -0400, Andrew Cagney wrote:
> > The shift fix matches this
> > comment in GCC and is not really specified by the ABI document:
>
>
> > - && TARGET_BYTE_ORDER == BIG_ENDIAN
> > + && (TARGET_BYTE_ORDER == BIG_ENDIAN
> > + || TYPE_LENGTH (arg_type) < MIPS_SAVED_REGSIZE)
> >
>
> 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.
The testcase was the passing of a three_char_t in call-ar-st (calling
print_three_chars from the gdb prompt).
--
Daniel Jacobowitz Carnegie Mellon University
MontaVista Software Debian GNU/Linux Developer