On Thu, Feb 07, 2013 at 02:38:18PM -0500, David Miller wrote:
> The fix for this is trivial, just a missing leaf renumbering in dwarf2out.c:
> 
> diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
> index 06cfb18..765d5c5 100644
> --- a/gcc/dwarf2out.c
> +++ b/gcc/dwarf2out.c
> @@ -10864,7 +10864,16 @@ based_loc_descr (rtx reg, HOST_WIDE_INT offset,
>       }
>      }
>  
> -  regno = DWARF_FRAME_REGNUM (REGNO (reg));
> +  regno = REGNO (reg);
> +#ifdef LEAF_REG_REMAP
> +  if (crtl->uses_only_leaf_regs)
> +    {
> +      int leaf_reg = LEAF_REG_REMAP (regno);
> +      if (leaf_reg != -1)
> +     regno = (unsigned) leaf_reg;
> +    }
> +#endif
> +  regno = DWARF_FRAME_REGNUM (regno);
>  
>    if (!optimize && fde
>        && (fde->drap_reg == regno || fde->vdrap_reg == regno))

This and earlier patch are ok, if it bootstraps/regtests fine, and suitable
ChangeLog entry is provided.
Running gdb testsuite before and after wouldn't hurt though.

        Jakub

Reply via email to