This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
fix Xtensa debug register numbers
- From: Bob Wilson <bwilson at tensilica dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Thu, 9 Oct 2003 13:22:18 -0700
- Subject: fix Xtensa debug register numbers
- Organization: Tensilica, Inc.
This patch fixes the Xtensa port to set the correct debugger register numbers
for the optional floating-point register file and MAC16 accumulator.
Committed on mainline.
2003-10-09 Bob Wilson <bob.wilson@acm.org>
* config/xtensa/xtensa.c (xtensa_dbx_register_number): Change first
FP register number to 48 and MAC16 accumulator to 0x210.
Index: xtensa.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/xtensa/xtensa.c,v
retrieving revision 1.39
diff -u -r1.39 xtensa.c
--- xtensa.c 5 Oct 2003 13:34:45 -0000 1.39
+++ xtensa.c 9 Oct 2003 20:19:17 -0000
@@ -1646,7 +1646,7 @@
}
-/* Return the stabs register number to use for 'regno'. */
+/* Return the debugger register number to use for 'regno'. */
int
xtensa_dbx_register_number (int regno)
@@ -1666,17 +1666,12 @@
else if (FP_REG_P (regno))
{
regno -= FP_REG_FIRST;
- /* The current numbering convention is that TIE registers are
- numbered in libcc order beginning with 256. We can't guarantee
- that the FP registers will come first, so the following is just
- a guess. It seems like we should make a special case for FP
- registers and give them fixed numbers < 256. */
- first = 256;
+ first = 48;
}
else if (ACC_REG_P (regno))
{
- first = 0;
- regno = -1;
+ first = 0x200; /* Start of Xtensa special registers. */
+ regno = 16; /* ACCLO is special register 16. */
}
/* When optimizing, we sometimes get asked about pseudo-registers