* [RFA] mips_register_virtual_type
@ 2002-08-20 17:13 Michael Snyder
2002-08-20 19:08 ` Andrew Cagney
0 siblings, 1 reply; 2+ messages in thread
From: Michael Snyder @ 2002-08-20 17:13 UTC (permalink / raw)
To: gdb-patches; +Cc: cagney, kevinb
Andrew, Kevin,
I think with this change, mips_virtual_register_type is robust enough
to use with all mips configurations. What do you think? Can we
blow away the remaining definitions of REGISTER_VIRTUAL_TYPE?
Michael
2002-08-20 Michael Snyder <msnyder@redhat.com>
* mips-tdep.c (mips_register_virtual_type): Account for
FP_REGISTER_DOUBLE.
Index: mips-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/mips-tdep.c,v
retrieving revision 1.115
diff -p -r1.115 mips-tdep.c
*** mips-tdep.c 20 Aug 2002 23:07:42 -0000 1.115
--- mips-tdep.c 21 Aug 2002 00:10:08 -0000
*************** if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG
*** 571,577 ****
definitions found in config/mips/tm-*.h. I'm concerned about
the ``FCRCS_REGNUM <= reg && reg <= LAST_EMBED_REGNUM'' clause
though. In some cases FP_REGNUM is in this range, and I doubt
! that this code is correct for the 64-bit case. */
static struct type *
mips_register_virtual_type (int reg)
--- 571,581 ----
definitions found in config/mips/tm-*.h. I'm concerned about
the ``FCRCS_REGNUM <= reg && reg <= LAST_EMBED_REGNUM'' clause
though. In some cases FP_REGNUM is in this range, and I doubt
! that this code is correct for the 64-bit case.
!
! MVS: FCRCS_REGNUM will not overlap with the FP registers.
! On Irix, the FP registers run from 32 to 63 and FCRCS is 69.
! Everywhere else, they run from 38 to 69 and FCRCS is 70. */
static struct type *
mips_register_virtual_type (int reg)
*************** mips_register_virtual_type (int reg)
*** 580,588 ****
{
/* Floating point registers... */
if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
! return builtin_type_ieee_double_big;
else
! return builtin_type_ieee_double_little;
}
else if (reg == PS_REGNUM /* CR */)
return builtin_type_uint32;
--- 584,594 ----
{
/* Floating point registers... */
if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
! return FP_REGISTER_DOUBLE ?
! builtin_type_ieee_double_big : builtin_type_ieee_single_big;
else
! return FP_REGISTER_DOUBLE ?
! builtin_type_ieee_double_little : builtin_type_ieee_single_little;
}
else if (reg == PS_REGNUM /* CR */)
return builtin_type_uint32;
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [RFA] mips_register_virtual_type
2002-08-20 17:13 [RFA] mips_register_virtual_type Michael Snyder
@ 2002-08-20 19:08 ` Andrew Cagney
0 siblings, 0 replies; 2+ messages in thread
From: Andrew Cagney @ 2002-08-20 19:08 UTC (permalink / raw)
To: Michael Snyder; +Cc: gdb-patches, cagney, kevinb
> Andrew, Kevin,
>
> I think with this change, mips_virtual_register_type is robust enough
> to use with all mips configurations. What do you think? Can we
> blow away the remaining definitions of REGISTER_VIRTUAL_TYPE?
See other e-mail.
Andrew
> 2002-08-20 Michael Snyder <msnyder@redhat.com>
>
> * mips-tdep.c (mips_register_virtual_type): Account for
> FP_REGISTER_DOUBLE.
>
> Index: mips-tdep.c
> ===================================================================
> RCS file: /cvs/src/src/gdb/mips-tdep.c,v
> retrieving revision 1.115
> diff -p -r1.115 mips-tdep.c
> *** mips-tdep.c 20 Aug 2002 23:07:42 -0000 1.115
> --- mips-tdep.c 21 Aug 2002 00:10:08 -0000
> *************** if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG
> *** 571,577 ****
> definitions found in config/mips/tm-*.h. I'm concerned about
> the ``FCRCS_REGNUM <= reg && reg <= LAST_EMBED_REGNUM'' clause
> though. In some cases FP_REGNUM is in this range, and I doubt
> ! that this code is correct for the 64-bit case. */
>
> static struct type *
> mips_register_virtual_type (int reg)
> --- 571,581 ----
> definitions found in config/mips/tm-*.h. I'm concerned about
> the ``FCRCS_REGNUM <= reg && reg <= LAST_EMBED_REGNUM'' clause
> though. In some cases FP_REGNUM is in this range, and I doubt
> ! that this code is correct for the 64-bit case.
> !
> ! MVS: FCRCS_REGNUM will not overlap with the FP registers.
> ! On Irix, the FP registers run from 32 to 63 and FCRCS is 69.
> ! Everywhere else, they run from 38 to 69 and FCRCS is 70. */
>
> static struct type *
> mips_register_virtual_type (int reg)
> *************** mips_register_virtual_type (int reg)
> *** 580,588 ****
> {
> /* Floating point registers... */
> if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
> ! return builtin_type_ieee_double_big;
> else
> ! return builtin_type_ieee_double_little;
> }
> else if (reg == PS_REGNUM /* CR */)
> return builtin_type_uint32;
> --- 584,594 ----
> {
> /* Floating point registers... */
> if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
> ! return FP_REGISTER_DOUBLE ?
> ! builtin_type_ieee_double_big : builtin_type_ieee_single_big;
> else
> ! return FP_REGISTER_DOUBLE ?
> ! builtin_type_ieee_double_little : builtin_type_ieee_single_little;
> }
> else if (reg == PS_REGNUM /* CR */)
> return builtin_type_uint32;
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2002-08-21 2:08 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-08-20 17:13 [RFA] mips_register_virtual_type Michael Snyder
2002-08-20 19:08 ` Andrew Cagney
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox