Commit 99309f3b by Richard Kenner

(find_regno_note): Find note that overlaps REGNO, not just one that

mentions REGNO explicitly.

From-SVN: r3929
parent 2c0623e8
...@@ -1135,7 +1135,9 @@ find_reg_note (insn, kind, datum) ...@@ -1135,7 +1135,9 @@ find_reg_note (insn, kind, datum)
} }
/* Return the reg-note of kind KIND in insn INSN which applies to register /* Return the reg-note of kind KIND in insn INSN which applies to register
number REGNO, if any. Return 0 if there is no such reg-note. */ number REGNO, if any. Return 0 if there is no such reg-note. Note that
the REGNO of this NOTE need not be REGNO if REGNO is a hard register;
it might be the case that the note overlaps REGNO. */
rtx rtx
find_regno_note (insn, kind, regno) find_regno_note (insn, kind, regno)
...@@ -1150,7 +1152,12 @@ find_regno_note (insn, kind, regno) ...@@ -1150,7 +1152,12 @@ find_regno_note (insn, kind, regno)
/* Verify that it is a register, so that scratch and MEM won't cause a /* Verify that it is a register, so that scratch and MEM won't cause a
problem here. */ problem here. */
&& GET_CODE (XEXP (link, 0)) == REG && GET_CODE (XEXP (link, 0)) == REG
&& REGNO (XEXP (link, 0)) == regno) && REGNO (XEXP (link, 0)) <= regno
&& ((REGNO (XEXP (link, 0))
+ (REGNO (XEXP (link, 0)) >= FIRST_PSEUDO_REGISTER ? 1
: HARD_REGNO_NREGS (REGNO (XEXP (link, 0)),
GET_MODE (XEXP (link, 0)))))
> regno))
return link; return link;
return 0; return 0;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment