This is the mail archive of the gdb-patches@sources.redhat.com 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] mips_register_virtual_type


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;



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