[RFA] MIPS: Provide DWARF 2 mappings for HI, LO, and HILO
Kevin Buettner
kevinb@redhat.com
Fri Mar 28 07:26:00 GMT 2003
The patch below adds mappings from the internal gcc register numbers
HI_REGNUM, LO_REGNUM, and HILO_REGNUM to unused values above those
presently used in debugging information. Previously, these registers
were mapped to -1 which would then erroneously appear in DWARF 2
location expressions.
For further background, see the thread starting with:
http://gcc.gnu.org/ml/gcc-patches/2003-03/msg00558.html
Okay?
* config/mips/mips.c (override_optioins): Provide mappings for
HI_REGNUM, LO_REGNUM, and HILO_REGNUM.
* config/mips/mips.h (MD_DBX_FIRST): Define.
Index: config/mips/mips.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/mips/mips.c,v
retrieving revision 1.252
diff -u -p -r1.252 mips.c
--- config/mips/mips.c 19 Feb 2003 18:03:09 -0000 1.252
+++ config/mips/mips.c 28 Mar 2003 05:08:55 -0000
@@ -5767,6 +5767,10 @@ override_options ()
for (i = FP_REG_FIRST; i <= FP_REG_LAST; i++)
mips_dbx_regno[i] = i + start;
+ start = MD_DBX_FIRST - MD_REG_FIRST;
+ for (i = MD_REG_FIRST; i <= MD_REG_LAST; i++)
+ mips_dbx_regno[i] = i + start;
+
/* Set up array giving whether a given register can hold a given mode.
At present, restrict ints from being in FP registers, because reload
is a little enthusiastic about storing extra values in FP registers,
Index: config/mips/mips.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/mips/mips.h,v
retrieving revision 1.241
diff -u -p -r1.241 mips.h
--- config/mips/mips.h 14 Mar 2003 15:53:48 -0000 1.241
+++ config/mips/mips.h 28 Mar 2003 05:08:57 -0000
@@ -1851,6 +1851,7 @@ do { \
#define MD_REG_FIRST 64
#define MD_REG_LAST 66
#define MD_REG_NUM (MD_REG_LAST - MD_REG_FIRST + 1)
+#define MD_DBX_FIRST (FP_DBX_FIRST + FP_REG_NUM)
#define ST_REG_FIRST 67
#define ST_REG_LAST 74
More information about the Gcc-patches
mailing list