+2004-07-01 Richard Henderson <rth@redhat.com>
+
+ * dwarf2out.c (reg_save): Use INVALID_REGNUM.
+ (dwarf2out_reg_save, dwarf2out_return_save): Likewise.
+ (initial_return_save): Likewise.
+ (flush_queued_reg_saves): Remap register numbers.
+ (dwarf2out_return_reg): Likewise.
+
2004-07-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
* gimplify.c (gimplify_one_sizepos): Don't do anything if any VAR_DECL.
cfi->dw_cfi_oprnd1.dw_cfi_reg_num = reg;
- /* The following comparison is correct. -1 is used to indicate that
- the value isn't a register number. */
- if (sreg == (unsigned int) -1)
+ if (sreg == INVALID_REGNUM)
{
if (reg & ~0x3f)
/* The register number won't fit in 6 bits, so we have to use
void
dwarf2out_reg_save (const char *label, unsigned int reg, HOST_WIDE_INT offset)
{
- reg_save (label, DWARF_FRAME_REGNUM (reg), -1, offset);
+ reg_save (label, DWARF_FRAME_REGNUM (reg), INVALID_REGNUM, offset);
}
/* Entry point for saving the return address in the stack.
void
dwarf2out_return_save (const char *label, HOST_WIDE_INT offset)
{
- reg_save (label, DWARF_FRAME_RETURN_COLUMN, -1, offset);
+ reg_save (label, DWARF_FRAME_RETURN_COLUMN, INVALID_REGNUM, offset);
}
/* Entry point for saving the return address in a register.
void
dwarf2out_return_reg (const char *label, unsigned int sreg)
{
- reg_save (label, DWARF_FRAME_RETURN_COLUMN, sreg, 0);
+ reg_save (label, DWARF_FRAME_RETURN_COLUMN, DWARF_FRAME_REGNUM (sreg), 0);
}
/* Record the initial position of the return address. RTL is
static void
initial_return_save (rtx rtl)
{
- unsigned int reg = (unsigned int) -1;
+ unsigned int reg = INVALID_REGNUM;
HOST_WIDE_INT offset = 0;
switch (GET_CODE (rtl))
for (q = queued_reg_saves; q; q = q->next)
{
size_t i;
+ unsigned int reg, sreg;
+
for (i = 0; i < num_regs_saved_in_regs; i++)
if (REGNO (regs_saved_in_regs[i].orig_reg) == REGNO (q->reg))
break;
regs_saved_in_regs[i].saved_in_reg = q->saved_reg;
}
- reg_save (last_reg_save_label, REGNO (q->reg),
- q->saved_reg ? REGNO (q->saved_reg) : -1U, q->cfa_offset);
+ reg = DWARF_FRAME_REGNUM (REGNO (q->reg));
+ if (q->saved_reg)
+ sreg = DWARF_FRAME_REGNUM (REGNO (q->saved_reg));
+ else
+ sreg = INVALID_REGNUM;
+ reg_save (last_reg_save_label, reg, sreg, q->cfa_offset);
}
queued_reg_saves = NULL;