+2004-04-27 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
+
+ PR debug/14829
+ * dwarf2out.c (reg_number): Rename to dbx_reg_number. Adjust all
+ callers.
+ (multiple_reg_loc_descriptor, reg_loc_descriptor): Use gcc register
+ number for indexing hard_regno_nregs array.
+
2004-04-27 Geoffrey Keating <geoffk@apple.com>
* config/darwin.h (STARTFILE_SPEC): Use %s to find crt2.o.
static dw_die_ref subrange_type_die (tree, dw_die_ref);
static dw_die_ref modified_type_die (tree, int, int, dw_die_ref);
static int type_is_enum (tree);
-static unsigned int reg_number (rtx);
+static unsigned int dbx_reg_number (rtx);
static dw_loc_descr_ref reg_loc_descriptor (rtx);
static dw_loc_descr_ref one_reg_loc_descriptor (unsigned int);
static dw_loc_descr_ref multiple_reg_loc_descriptor (rtx, rtx);
return TREE_CODE (type) == ENUMERAL_TYPE;
}
-/* Return the register number described by a given RTL node. */
+/* Return the DBX register number described by a given RTL node. */
static unsigned int
-reg_number (rtx rtl)
+dbx_reg_number (rtx rtl)
{
unsigned regno = REGNO (rtl);
if (REGNO (rtl) >= FIRST_PSEUDO_REGISTER)
return 0;
- reg = reg_number (rtl);
+ reg = dbx_reg_number (rtl);
regs = targetm.dwarf_register_span (rtl);
- if (hard_regno_nregs[reg][GET_MODE (rtl)] > 1
+ if (hard_regno_nregs[REGNO (rtl)][GET_MODE (rtl)] > 1
|| regs)
return multiple_reg_loc_descriptor (rtl, regs);
else
unsigned reg;
dw_loc_descr_ref loc_result = NULL;
- reg = reg_number (rtl);
- nregs = hard_regno_nregs[reg][GET_MODE (rtl)];
+ reg = dbx_reg_number (rtl);
+ nregs = hard_regno_nregs[REGNO (rtl)][GET_MODE (rtl)];
/* Simple, contiguous registers. */
if (regs == NULL_RTX)
memory) so DWARF consumers need to be aware of the subtle
distinction between OP_REG and OP_BASEREG. */
if (REGNO (rtl) < FIRST_PSEUDO_REGISTER)
- mem_loc_result = based_loc_descr (reg_number (rtl), 0, can_use_fbreg);
+ mem_loc_result = based_loc_descr (dbx_reg_number (rtl), 0,
+ can_use_fbreg);
break;
case MEM:
case PLUS:
plus:
if (is_based_loc (rtl))
- mem_loc_result = based_loc_descr (reg_number (XEXP (rtl, 0)),
+ mem_loc_result = based_loc_descr (dbx_reg_number (XEXP (rtl, 0)),
INTVAL (XEXP (rtl, 1)),
can_use_fbreg);
else