summaryrefslogtreecommitdiff
path: root/gcc/reorg.c
diff options
context:
space:
mode:
authorRichard Kenner <kenner@gcc.gnu.org>1994-10-31 07:49:04 -0500
committerRichard Kenner <kenner@gcc.gnu.org>1994-10-31 07:49:04 -0500
commitf4f56bb7cde279487a17243d1801d92020889fce (patch)
treec973ef93f44a9e68fc18acab2a5c472630d1a3a5 /gcc/reorg.c
parent73620b82c8141210910ac4451364eab5cbf723b8 (diff)
downloadgcc-f4f56bb7cde279487a17243d1801d92020889fce.tar.gz
(mark_set_resources): Properly handle SUBREGs.
From-SVN: r8364
Diffstat (limited to 'gcc/reorg.c')
-rw-r--r--gcc/reorg.c16
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++)