reload.c (find_reloads): Also check that all of a multi-reg value is in the class.
authorDJ Delorie <dj@redhat.com>
Fri, 2 May 2003 00:53:45 +0000 (20:53 -0400)
committerDJ Delorie <dj@gcc.gnu.org>
Fri, 2 May 2003 00:53:45 +0000 (20:53 -0400)
* reload.c (find_reloads): Also check that all of a multi-reg
value is in the class.

From-SVN: r66366

gcc/ChangeLog
gcc/reload.c

index 9d3429f2c714c2a3a38b470aac01b7838362f017..deea69fa20eb7b7dc8412b1c7b417b881e24dad2 100644 (file)
@@ -1,3 +1,8 @@
+2003-05-01  DJ Delorie  <dj@redhat.com>
+
+       * reload.c (find_reloads): Also check that all of a multi-reg
+       value is in the class.
+
 2003-05-01  Nathan Sidwell  <nathan@codesourcery.com>
 
        * scan.h (lineno): Revert the rename here.
index bc3c1771d972ca38cc2ea4492cd3a411a47286e4..5a82d995a2c2e6e4c306a2929742291cb8c97b4b 100644 (file)
@@ -4346,7 +4346,17 @@ find_reloads (insn, replace, ind_levels, live_known, reload_reg_p)
        if (regno < FIRST_PSEUDO_REGISTER
            && TEST_HARD_REG_BIT (reg_class_contents[rld[i].class], regno)
            && HARD_REGNO_MODE_OK (regno, rld[i].mode))
-         rld[i].reg_rtx = dest;
+         {
+           int nr = HARD_REGNO_NREGS (regno, rld[i].mode);
+           int ok = 1, nri;
+
+           for (nri = 1; nri < nr; nri ++)
+             if (! TEST_HARD_REG_BIT (reg_class_contents[rld[i].class], regno + nri))
+               ok = 0;
+
+           if (ok)
+             rld[i].reg_rtx = dest;
+         }
       }
 
   return retval;