In revision 91802, the tests in find_valid_class got garbled so that with
n > 0, it won't accept a class that does not include FIRST_PSEUDO_REGISTER - 1.

The attached patch restores the status quo ante of allowing register classes
that stop earlier.

This fixes the compile/pr55921.c failures for avr.

bootstrapped/regtested on i686-pc-linux-gnu.
regtested on i686-pc-linuc-gnu X sh-elf.
2013-05-02  Joern Rennecke <joern.renne...@embecosm.com>

        * reload.c (find_valid_class): Allow classes that do not include
        FIRST_PSEUDO_REGISTER - 1.

Index: reload.c
===================================================================
--- reload.c    (revision 198511)
+++ reload.c    (working copy)
@@ -680,8 +680,8 @@ find_valid_class (enum machine_mode oute
            if (HARD_REGNO_MODE_OK (regno, inner))
              {
                good = 1;
-               if (! TEST_HARD_REG_BIT (reg_class_contents[rclass], regno + n)
-                   || ! HARD_REGNO_MODE_OK (regno + n, outer))
+               if (TEST_HARD_REG_BIT (reg_class_contents[rclass], regno + n)
+                   && ! HARD_REGNO_MODE_OK (regno + n, outer))
                  bad = 1;
              }
          }

Reply via email to