From f4f56bb7cde279487a17243d1801d92020889fce Mon Sep 17 00:00:00 2001 From: Richard Kenner Date: Mon, 31 Oct 1994 07:49:04 -0500 Subject: (mark_set_resources): Properly handle SUBREGs. From-SVN: r8364 --- gcc/reorg.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'gcc') diff --git a/gcc/reorg.c b/gcc/reorg.c index 7100010..250cf99 100644 --- a/gcc/reorg.c +++ b/gcc/reorg.c @@ -607,6 +607,22 @@ mark_set_resources (x, res, in_dest, include_delayed_effects) mark_set_resources (XEXP (x, 0), res, 0, 0); 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: if (in_dest) for (i = 0; i < HARD_REGNO_NREGS (REGNO (x), GET_MODE (x)); i++) -- cgit v1.1