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:35:14 -0700
- Cc: gdb-patches at sources dot redhat dot com
- References: <20010706112635.A5870@nevyn.them.org> <3B4D5552.4070403@cygnus.com>
On Thu, Jul 12, 2001 at 03:44:18AM -0400, Andrew Cagney wrote:
> > These are based on testsuite failures (call-*-st, if I remember correctly)
> > and reading the argument passing code in GCC. The struct alignment fix
> > definitely agrees with the ABI, though it's not always clear on this point -
> > it becomes necessary for us when the return value is a struct and thus there
> > is a hidden pointer as the first argument. The shift fix matches this
> > comment in GCC and is not really specified by the ABI document:
>
>
> I get the feeling that these two changes fix two separate bugs:
>
> o botched struct parameter pass
>
> o botched struct return
Actually, they're both struct parameter passing. But yes, two separate
bugs.
> Looking at just the first one:
>
> > + /* Structures should be aligned to eight bytes (even arg registers)
> > + on MIPS_ABI_O32 if their first member has double precision. */
> > + if (gdbarch_tdep (current_gdbarch)->mips_abi == MIPS_ABI_O32
> > + && mips_type_needs_double_align (arg_type))
> > + {
> > + argreg += argreg & 1;
> > + }
>
> this is approved. However could you please change the expression:
> to something like:
>
>
> if ((argreg & 1))
> argreg++;
Changed, and committed. Thanks.
> your original expression makes my head hurt :-)
Got it from GCC :)
--
Daniel Jacobowitz Carnegie Mellon University
MontaVista Software Debian GNU/Linux Developer