This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RFA: small patch to fix IRA crash of m68k compiler


Hello!

> Yes, you are right. I missed this. It should be
>
> 2008-09-08 Vladimir Makarov <vmakarov@redhat.com>
>
>   * ira-conflicts.c (process_regs_for_copy): Check that the hard
>   regno is in the right range.

You can use IN_RANGE macro here.

Uros.

> Index: ira-conflicts.c
> ===================================================================
> --- ira-conflicts.c	(revision 140117)
> +++ ira-conflicts.c	(working copy)
> @@ -366,6 +366,9 @@ process_regs_for_copy (rtx reg1, rtx reg
>      }
>    else
>      return false;
> +  if (hard_regno < 0 || hard_regno >= FIRST_PSEUDO_REGISTER)

if (! IN_RANGE (hard_regno, 0, FIRST_PSEUDO_REGISTER-1)

> +    /* Can not be tied.  */
> +    return false;
>    rclass = REGNO_REG_CLASS (hard_regno);
>    mode = ALLOCNO_MODE (a);
>    cover_class = ALLOCNO_COVER_CLASS (a);
> @@ -377,6 +380,7 @@ process_regs_for_copy (rtx reg1, rtx reg
>      return false;
>    index = ira_class_hard_reg_index[cover_class][hard_regno];
>    if (index < 0)
> +    /* Can not be tied.  It is not in the cover class.  */
>      return false;
>    if (HARD_REGISTER_P (reg1))
>      cost = ira_register_move_cost[mode][cover_class][rclass] * freq;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]