This is the mail archive of the gdb-patches@sourceware.org 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]
Other format: [Raw text]

Re: [RFA] Patch for mips_o64_return_value to fix calling functions by hand (additional patch)


On Tue, May 02, 2006 at 04:30:15PM -0400, Fred Fish wrote:
> On Thursday 27 April 2006 10:04, Fred Fish wrote:
> > I'm doing some work with a mips64-elf toolchain and took a look at why
> > there are so many gdb testsuite failures.  One problem I found is that
> > calling functions by hand was broken,
> 
> For mips_o64_push_dummy_call, mips_abi_regsize(gdbarch) always
> evaluates to 8, and was suppressing a needed left shift of struct and
> union arguments passed big endian.

So, why didn't it used to be done on o64 targets?  That's the
question.  This goes back to CVS revision 1.1.

GCC says: pad "upwards" on little endian (i.e. in the most significant
bits).  On big endian, "upwards" means least significant bits.  It pads
floats downward for o64, but other than that o32 and o64 are treated
the same.  So, I'm guessing GDB is just wrong, or else the ABI change
is farther back in history than I checked.

Aside: The comment below the one you're deleting was written well
before GCC 3.4, in particular http://gcc.gnu.org/gcc-3.4/mips-abi.html. 
So the FIXME is probably fixed for o32 now.  And this is now an o64
only function, so that comment could be deleted entirely.

> 2006-05-02  Fred Fish  <fnf@specifix.com>
> 
> 	* mips-tdep.c (mips_o64_push_dummy_call): Left shift big endian
> 	structs or unions independent of ABI register size.

OK.


-- 
Daniel Jacobowitz
CodeSourcery


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