]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
ira-lives.c (single_reg_class): Add missing break.
authorRichard Sandiford <rdsandiford@googlemail.com>
Fri, 6 Jun 2014 06:59:22 +0000 (06:59 +0000)
committerRichard Sandiford <rsandifo@gcc.gnu.org>
Fri, 6 Jun 2014 06:59:22 +0000 (06:59 +0000)
gcc/
* ira-lives.c (single_reg_class): Add missing break.  Explicitly
return NO_REGS for extra address and memory constraints.  Handle
operands that match (or are equivalent to something that matches)
extra constant constraints.  Ignore other non-register operands.

From-SVN: r211300

gcc/ChangeLog
gcc/ira-lives.c

index af977a09fdcc1d44d5200d465c3ecef78817980b..a46cfda428bd2667159e78eb816c5956b255ef7c 100644 (file)
@@ -1,3 +1,10 @@
+2014-06-06  Richard Sandiford  <rdsandiford@googlemail.com>
+
+       * ira-lives.c (single_reg_class): Add missing break.  Explicitly
+       return NO_REGS for extra address and memory constraints.  Handle
+       operands that match (or are equivalent to something that matches)
+       extra constant constraints.  Ignore other non-register operands.
+
 2014-06-06  Alan Modra  <amodra@gmail.com>
 
        PR target/61300
index 65133202432826a5abc8671c2f142775502f0bf2..bb03967225b566418229ba65d0951c6c07456fb1 100644 (file)
@@ -839,7 +839,8 @@ single_reg_class (const char *constraints, rtx op, rtx equiv_const)
                  && CONST_DOUBLE_OK_FOR_CONSTRAINT_P (equiv_const,
                                                       c, constraints)))
            return NO_REGS;
-         /* ??? what about memory */
+         break;
+
        case 'r':
        case 'a': case 'b': case 'c': case 'd': case 'e': case 'f':
        case 'h': case 'j': case 'k': case 'l':
@@ -848,9 +849,22 @@ single_reg_class (const char *constraints, rtx op, rtx equiv_const)
        case 'A': case 'B': case 'C': case 'D':
        case 'Q': case 'R': case 'S': case 'T': case 'U':
        case 'W': case 'Y': case 'Z':
+#ifdef EXTRA_CONSTRAINT_STR
+         /* ??? Is this the best way to handle memory constraints?  */
+         if (EXTRA_MEMORY_CONSTRAINT (c, constraints)
+             || EXTRA_ADDRESS_CONSTRAINT (c, constraints))
+           return NO_REGS;
+         if (EXTRA_CONSTRAINT_STR (op, c, constraints)
+             || (equiv_const != NULL_RTX
+                 && CONSTANT_P (equiv_const)
+                 && EXTRA_CONSTRAINT_STR (equiv_const, c, constraints)))
+           return NO_REGS;
+#endif
          next_cl = (c == 'r'
                     ? GENERAL_REGS
                     : REG_CLASS_FROM_CONSTRAINT (c, constraints));
+         if (next_cl == NO_REGS)
+           break;
          if (cl == NO_REGS
              ? ira_class_singleton[next_cl][GET_MODE (op)] < 0
              : (ira_class_singleton[cl][GET_MODE (op)]