diff options
author | Richard Kenner <kenner@gcc.gnu.org> | 1994-10-31 07:49:04 -0500 |
---|---|---|
committer | Richard Kenner <kenner@gcc.gnu.org> | 1994-10-31 07:49:04 -0500 |
commit | f4f56bb7cde279487a17243d1801d92020889fce (patch) | |
tree | c973ef93f44a9e68fc18acab2a5c472630d1a3a5 /gcc/reorg.c | |
parent | 73620b82c8141210910ac4451364eab5cbf723b8 (diff) | |
download | gcc-f4f56bb7cde279487a17243d1801d92020889fce.tar.gz |
(mark_set_resources): Properly handle SUBREGs.
From-SVN: r8364
Diffstat (limited to 'gcc/reorg.c')
-rw-r--r-- | gcc/reorg.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/gcc/reorg.c b/gcc/reorg.c index 71000107935..250cf997158 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++) |