Commit f4f56bb7 by Richard Kenner

(mark_set_resources): Properly handle SUBREGs.

From-SVN: r8364
parent 73620b82
...@@ -607,6 +607,22 @@ mark_set_resources (x, res, in_dest, include_delayed_effects) ...@@ -607,6 +607,22 @@ mark_set_resources (x, res, in_dest, include_delayed_effects)
mark_set_resources (XEXP (x, 0), res, 0, 0); mark_set_resources (XEXP (x, 0), res, 0, 0);
return; return;
case SUBREG:
if (in_dest)
{
if (GET_CODE (SUBREG_REG (x)) != REG)
mark_set_resources (SUBREG_REG (x), res,
in_dest, include_delayed_effects);
else
{
int regno = REGNO (SUBREG_REG (x)) + SUBREG_WORD (x);
int last_regno = regno + HARD_REGNO_NREGS (regno, GET_MODE (x));
for (i = regno; i < last_regno; i++)
SET_HARD_REG_BIT (res->regs, i);
}
}
return;
case REG: case REG:
if (in_dest) if (in_dest)
for (i = 0; i < HARD_REGNO_NREGS (REGNO (x), GET_MODE (x)); i++) for (i = 0; i < HARD_REGNO_NREGS (REGNO (x), GET_MODE (x)); i++)
......
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