Commit e28f5732 by Richard Kenner

(use_crosses_set_p): Check for partially overlapping hard regs.

From-SVN: r5163
parent e572bad3
...@@ -9404,14 +9404,20 @@ use_crosses_set_p (x, from_cuid) ...@@ -9404,14 +9404,20 @@ use_crosses_set_p (x, from_cuid)
if (code == REG) if (code == REG)
{ {
register int regno = REGNO (x); register int regno = REGNO (x);
int endreg = regno + (regno < FIRST_PSEUDO_REGISTER
? HARD_REGNO_NREGS (regno, GET_MODE (x)) : 1);
#ifdef PUSH_ROUNDING #ifdef PUSH_ROUNDING
/* Don't allow uses of the stack pointer to be moved, /* Don't allow uses of the stack pointer to be moved,
because we don't know whether the move crosses a push insn. */ because we don't know whether the move crosses a push insn. */
if (regno == STACK_POINTER_REGNUM) if (regno == STACK_POINTER_REGNUM)
return 1; return 1;
#endif #endif
return (reg_last_set[regno] for (;regno < endreg; regno++)
&& INSN_CUID (reg_last_set[regno]) > from_cuid); if (reg_last_set[regno]
&& INSN_CUID (reg_last_set[regno]) > from_cuid)
return 1;
return 0;
} }
if (code == MEM && mem_last_set > from_cuid) if (code == MEM && mem_last_set > from_cuid)
......
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