+2017-09-12 Richard Sandiford <richard.sandiford@linaro.org>
+
+ * config/frv/frv.c (FOR_EACH_REGNO): Use END_REGNO instead of
+ hard_regno_nregs.
+ * config/v850/v850.c (v850_reorg): Likewise.
+ * reload.c (refers_to_regno_for_reload_p): Likewise.
+ (find_equiv_reg): Likewise.
+ * reload1.c (reload_reg_reaches_end_p): Likewise.
+
2017-09-12 Richard Sandiford <richard.sandiford@linaro.org>
* caller-save.c (add_used_regs): Use REG_NREGS instead of
return 0;
}
- return (endregno > r
- && regno < r + (r < FIRST_PSEUDO_REGISTER
- ? hard_regno_nregs[r][GET_MODE (x)]
- : 1));
+ return endregno > r && regno < END_REGNO (x);
case SUBREG:
/* If this is a SUBREG of a hard reg, we can see exactly which
{
int i;
for (i = 0; i < n_reloads; i++)
- if (rld[i].reg_rtx != 0 && rld[i].in)
- {
- int regno1 = REGNO (rld[i].reg_rtx);
- int nregs1 = hard_regno_nregs[regno1]
- [GET_MODE (rld[i].reg_rtx)];
- if (regno1 < valueno + valuenregs
- && regno1 + nregs1 > valueno)
- return 0;
- }
+ if (rld[i].reg_rtx != 0
+ && rld[i].in
+ && (int) REGNO (rld[i].reg_rtx) < valueno + valuenregs
+ && (int) END_REGNO (rld[i].reg_rtx) > valueno)
+ return 0;
}
if (goal_mem)
if (REG_P (dest))
{
int xregno = REGNO (dest);
- int xnregs;
- if (REGNO (dest) < FIRST_PSEUDO_REGISTER)
- xnregs = hard_regno_nregs[xregno][GET_MODE (dest)];
- else
- xnregs = 1;
- if (xregno < regno + nregs && xregno + xnregs > regno)
+ int end_xregno = END_REGNO (dest);
+ if (xregno < regno + nregs && end_xregno > regno)
return 0;
if (xregno < valueno + valuenregs
- && xregno + xnregs > valueno)
+ && end_xregno > valueno)
return 0;
if (goal_mem_addr_varies
&& reg_overlap_mentioned_for_reload_p (dest, goal))
if (REG_P (dest))
{
int xregno = REGNO (dest);
- int xnregs;
- if (REGNO (dest) < FIRST_PSEUDO_REGISTER)
- xnregs = hard_regno_nregs[xregno][GET_MODE (dest)];
- else
- xnregs = 1;
+ int end_xregno = END_REGNO (dest);
if (xregno < regno + nregs
- && xregno + xnregs > regno)
+ && end_xregno > regno)
return 0;
if (xregno < valueno + valuenregs
- && xregno + xnregs > valueno)
+ && end_xregno > valueno)
return 0;
if (goal_mem_addr_varies
&& reg_overlap_mentioned_for_reload_p (dest,
if (REG_P (dest))
{
int xregno = REGNO (dest);
- int xnregs
- = hard_regno_nregs[xregno][GET_MODE (dest)];
+ int end_xregno = END_REGNO (dest);
if (xregno < regno + nregs
- && xregno + xnregs > regno)
+ && end_xregno > regno)
return 0;
else if (xregno < valueno + valuenregs
- && xregno + xnregs > valueno)
+ && end_xregno > valueno)
return 0;
else if (goal_mem_addr_varies
&& reg_overlap_mentioned_for_reload_p (dest,