dwarf2out.c (dbx_reg_number): Check return value from LEAF_REG_REMAP and only use it if it is valid.

* dwarf2out.c (dbx_reg_number): Check return value from
  LEAF_REG_REMAP and only use it if it is valid.
  (multiple_reg_loc_descriptor): Likewise.

From-SVN: r113756
This commit is contained in:
Nick Clifton 2006-05-14 07:44:21 +00:00 committed by Nick Clifton
parent 75c3fb73f0
commit 834094639e
2 changed files with 20 additions and 2 deletions

View File

@ -1,3 +1,9 @@
2006-05-13 Nick Clifton <nickc@redhat.com>
* dwarf2out.c (dbx_reg_number): Check return value from
LEAF_REG_REMAP and only use it if it is valid.
(multiple_reg_loc_descriptor): Likewise.
2006-05-13 Richard Guenther <rguenther@suse.de>
* config.host <i[34567]86-*-cygwin*>: Append i386/x-cygwin to

View File

@ -8477,7 +8477,13 @@ dbx_reg_number (rtx rtl)
gcc_assert (regno < FIRST_PSEUDO_REGISTER);
#ifdef LEAF_REG_REMAP
regno = LEAF_REG_REMAP (regno);
{
int leaf_reg;
leaf_reg = LEAF_REG_REMAP (regno);
if (leaf_reg != -1)
regno = (unsigned) leaf_reg;
}
#endif
return DBX_REGISTER_NUMBER (regno);
@ -8546,7 +8552,13 @@ multiple_reg_loc_descriptor (rtx rtl, rtx regs)
reg = REGNO (rtl);
#ifdef LEAF_REG_REMAP
reg = LEAF_REG_REMAP (reg);
{
int leaf_reg;
leaf_reg = LEAF_REG_REMAP (reg);
if (leaf_reg != -1)
reg = (unsigned) leaf_reg;
}
#endif
gcc_assert ((unsigned) DBX_REGISTER_NUMBER (reg) == dbx_reg_number (rtl));
nregs = hard_regno_nregs[REGNO (rtl)][GET_MODE (rtl)];