* [RFA] mips, floating point arg passing
@ 2006-05-31 23:35 Michael Snyder
2006-06-08 19:16 ` Michael Snyder
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Michael Snyder @ 2006-05-31 23:35 UTC (permalink / raw)
To: Joel Brobecker, GDB Patches, Fred Fish
[-- Attachment #1: Type: text/plain, Size: 89 bytes --]
GDB is causing SIGFPE on target boards that have a FPU,
when compiled for a 32 bit ABI.
[-- Attachment #2: d3 --]
[-- Type: text/plain, Size: 1885 bytes --]
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;
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: [RFA] mips, floating point arg passing
2006-05-31 23:35 [RFA] mips, floating point arg passing Michael Snyder
@ 2006-06-08 19:16 ` Michael Snyder
2006-06-09 18:05 ` Joel Brobecker
2006-06-17 23:36 ` Mark Kettenis
2 siblings, 0 replies; 8+ messages in thread
From: Michael Snyder @ 2006-06-08 19:16 UTC (permalink / raw)
To: GDB Patches; +Cc: Joel Brobecker, Fred Fish
Ping?
Michael Snyder wrote:
> 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;
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: [RFA] mips, floating point arg passing
2006-05-31 23:35 [RFA] mips, floating point arg passing Michael Snyder
2006-06-08 19:16 ` Michael Snyder
@ 2006-06-09 18:05 ` Joel Brobecker
2006-06-09 18:20 ` Daniel Jacobowitz
2006-06-19 18:50 ` Michael Snyder
2006-06-17 23:36 ` Mark Kettenis
2 siblings, 2 replies; 8+ messages in thread
From: Joel Brobecker @ 2006-06-09 18:05 UTC (permalink / raw)
To: Michael Snyder; +Cc: GDB Patches, Fred Fish
Hello Michael,
> GDB is causing SIGFPE on target boards that have a FPU,
> when compiled for a 32 bit ABI.
I've only worked with the n32 ABI so far, so I'm not familiar with
the EABI nor o32 ABI. But I presume you know what you're talking
about :-).
> 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.
I'm not sure I really have the knowledge to approve but Daniel asked
for help in that department, so I'll give it a try.
This patch seems pretty logical to me, so go ahead and commit. Is it
possible to run the testsuite on either o32, or on a target board?
Thanks,
--
Joel
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [RFA] mips, floating point arg passing
2006-06-09 18:05 ` Joel Brobecker
@ 2006-06-09 18:20 ` Daniel Jacobowitz
2006-06-19 18:50 ` Michael Snyder
1 sibling, 0 replies; 8+ messages in thread
From: Daniel Jacobowitz @ 2006-06-09 18:20 UTC (permalink / raw)
To: Joel Brobecker; +Cc: Michael Snyder, GDB Patches, Fred Fish
On Fri, Jun 09, 2006 at 11:05:43AM -0700, Joel Brobecker wrote:
> Hello Michael,
>
> > GDB is causing SIGFPE on target boards that have a FPU,
> > when compiled for a 32 bit ABI.
>
> I've only worked with the n32 ABI so far, so I'm not familiar with
> the EABI nor o32 ABI. But I presume you know what you're talking
> about :-).
I can easily test on O32; is there a case in the testsuite that would
cover this? I don't remember any argument passing tests failing.
Anyway, o32 has 32-bit floating point registers according to the ABI,
so I don't see how this could affect o32.
--
Daniel Jacobowitz
CodeSourcery
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [RFA] mips, floating point arg passing
2006-06-09 18:05 ` Joel Brobecker
2006-06-09 18:20 ` Daniel Jacobowitz
@ 2006-06-19 18:50 ` Michael Snyder
2006-06-19 18:57 ` Mark Kettenis
1 sibling, 1 reply; 8+ messages in thread
From: Michael Snyder @ 2006-06-19 18:50 UTC (permalink / raw)
To: Joel Brobecker; +Cc: GDB Patches, Fred Fish
Joel Brobecker wrote:
> Hello Michael,
>
>
>>GDB is causing SIGFPE on target boards that have a FPU,
>>when compiled for a 32 bit ABI.
>
>
> I've only worked with the n32 ABI so far, so I'm not familiar with
> the EABI nor o32 ABI. But I presume you know what you're talking
> about :-).
>
>
>>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.
>
>
> I'm not sure I really have the knowledge to approve but Daniel asked
> for help in that department, so I'll give it a try.
>
> This patch seems pretty logical to me, so go ahead and commit. Is it
> possible to run the testsuite on either o32, or on a target board?
I did -- but it was quite some time ago now, and I couldn't
really put my hands on them. I'm pretty sure they got better.
Certainly they didn't get worse.
Committing.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [RFA] mips, floating point arg passing
2006-06-19 18:50 ` Michael Snyder
@ 2006-06-19 18:57 ` Mark Kettenis
0 siblings, 0 replies; 8+ messages in thread
From: Mark Kettenis @ 2006-06-19 18:57 UTC (permalink / raw)
To: msnyder; +Cc: brobecker, gdb-patches, fnf
> Date: Mon, 19 Jun 2006 11:50:11 -0700
> From: Michael Snyder <msnyder@redhat.com>
>
> Joel Brobecker wrote:
> > Hello Michael,
> >
> >
> >>GDB is causing SIGFPE on target boards that have a FPU,
> >>when compiled for a 32 bit ABI.
> >
> >
> > I've only worked with the n32 ABI so far, so I'm not familiar with
> > the EABI nor o32 ABI. But I presume you know what you're talking
> > about :-).
> >
> >
> >>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.
> >
> >
> > I'm not sure I really have the knowledge to approve but Daniel asked
> > for help in that department, so I'll give it a try.
> >
> > This patch seems pretty logical to me, so go ahead and commit. Is it
> > possible to run the testsuite on either o32, or on a target board?
>
> I did -- but it was quite some time ago now, and I couldn't
> really put my hands on them. I'm pretty sure they got better.
> Certainly they didn't get worse.
>
> Committing.
>
Whoa wait, you didn't answer my questions about the patch...
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [RFA] mips, floating point arg passing
2006-05-31 23:35 [RFA] mips, floating point arg passing Michael Snyder
2006-06-08 19:16 ` Michael Snyder
2006-06-09 18:05 ` Joel Brobecker
@ 2006-06-17 23:36 ` Mark Kettenis
2006-06-19 22:30 ` Daniel Jacobowitz
2 siblings, 1 reply; 8+ messages in thread
From: Mark Kettenis @ 2006-06-17 23:36 UTC (permalink / raw)
To: msnyder; +Cc: brobecker, gdb-patches, fnf
> Date: Wed, 31 May 2006 16:32:44 -0700
> From: Michael Snyder <msnyder@redhat.com>
>
> GDB is causing SIGFPE on target boards that have a FPU,
> when compiled for a 32 bit ABI.
Hmm, aren't all registers supposed to be 32-bit for o32. It seems to
me that we should hardcode that in the *_o32_* functions, instead of
trying to be register-size agnostic.
Mark
> 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.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [RFA] mips, floating point arg passing
2006-06-17 23:36 ` Mark Kettenis
@ 2006-06-19 22:30 ` Daniel Jacobowitz
0 siblings, 0 replies; 8+ messages in thread
From: Daniel Jacobowitz @ 2006-06-19 22:30 UTC (permalink / raw)
To: Mark Kettenis; +Cc: msnyder, brobecker, gdb-patches, fnf
On Sun, Jun 18, 2006 at 01:35:53AM +0200, Mark Kettenis wrote:
> > Date: Wed, 31 May 2006 16:32:44 -0700
> > From: Michael Snyder <msnyder@redhat.com>
> >
> > GDB is causing SIGFPE on target boards that have a FPU,
> > when compiled for a 32 bit ABI.
>
> Hmm, aren't all registers supposed to be 32-bit for o32. It seems to
> me that we should hardcode that in the *_o32_* functions, instead of
> trying to be register-size agnostic.
I am inclined to agree; what happened (IIRC) is that these
similar-looking functions were split from an identical parent at one
point to reduce changes for one ABI breaking another, and never cleaned
up.
--
Daniel Jacobowitz
CodeSourcery
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2006-06-19 22:30 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-05-31 23:35 [RFA] mips, floating point arg passing Michael Snyder
2006-06-08 19:16 ` Michael Snyder
2006-06-09 18:05 ` Joel Brobecker
2006-06-09 18:20 ` Daniel Jacobowitz
2006-06-19 18:50 ` Michael Snyder
2006-06-19 18:57 ` Mark Kettenis
2006-06-17 23:36 ` Mark Kettenis
2006-06-19 22:30 ` Daniel Jacobowitz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox