This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[RFA] mips, floating point arg passing
- From: Michael Snyder <msnyder at redhat dot com>
- To: Joel Brobecker <brobecker at adacore dot com>, GDB Patches <gdb-patches at sources dot redhat dot com>, Fred Fish <fnf at specifix dot com>
- Date: Wed, 31 May 2006 16:32:44 -0700
- Subject: [RFA] mips, floating point arg passing
GDB is causing SIGFPE on target boards that have a FPU,
when compiled for a 32 bit ABI.
2006-05-31 Michael Snyder <msnyder@redhat.com>
* mips-tdep.c (mips_eabi_push_dummy_call): For 32 bit ABI, to
decide how many registers it takes to pass a floating point
argument, what matters is the size of a floating point register
(not the size of a general purpose register).
(mips_o32_push_dummy_call): Ditto.
Index: mips-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/mips-tdep.c,v
retrieving revision 1.393
diff -p -r1.393 mips-tdep.c
*** mips-tdep.c 31 May 2006 23:15:50 -0000 1.393
--- mips-tdep.c 31 May 2006 23:28:59 -0000
*************** mips_eabi_push_dummy_call (struct gdbarc
*** 2494,2500 ****
if (fp_register_arg_p (typecode, arg_type)
&& float_argreg <= MIPS_LAST_FP_ARG_REGNUM)
{
! if (mips_abi_regsize (gdbarch) < 8 && len == 8)
{
int low_offset = TARGET_BYTE_ORDER == BFD_ENDIAN_BIG ? 4 : 0;
unsigned long regval;
--- 2494,2500 ----
if (fp_register_arg_p (typecode, arg_type)
&& float_argreg <= MIPS_LAST_FP_ARG_REGNUM)
{
! if (register_size (gdbarch, float_argreg) < 8 && len == 8)
{
int low_offset = TARGET_BYTE_ORDER == BFD_ENDIAN_BIG ? 4 : 0;
unsigned long regval;
*************** mips_o32_push_dummy_call (struct gdbarch
*** 3118,3124 ****
if (fp_register_arg_p (typecode, arg_type)
&& float_argreg <= MIPS_LAST_FP_ARG_REGNUM)
{
! if (mips_abi_regsize (gdbarch) < 8 && len == 8)
{
int low_offset = TARGET_BYTE_ORDER == BFD_ENDIAN_BIG ? 4 : 0;
unsigned long regval;
--- 3118,3124 ----
if (fp_register_arg_p (typecode, arg_type)
&& float_argreg <= MIPS_LAST_FP_ARG_REGNUM)
{
! if (register_size (gdbarch, float_argreg) < 8 && len == 8)
{
int low_offset = TARGET_BYTE_ORDER == BFD_ENDIAN_BIG ? 4 : 0;
unsigned long regval;