]> gcc.gnu.org Git - gcc.git/commitdiff
(mark_set_resources): Properly handle SUBREGs.
authorRichard Kenner <kenner@gcc.gnu.org>
Mon, 31 Oct 1994 12:49:04 +0000 (07:49 -0500)
committerRichard Kenner <kenner@gcc.gnu.org>
Mon, 31 Oct 1994 12:49:04 +0000 (07:49 -0500)
From-SVN: r8364

gcc/reorg.c

index 71000107935d5858dc8b6062dcb895098f82f708..250cf9971588f942a584f0d4d23b1254f13cb126 100644 (file)
@@ -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++)
This page took 1.412718 seconds and 5 git commands to generate.