genrecog.c (add_to_sequence): Move allow_const_int test outside known predicate block...
authorRichard Henderson <rth@cygnus.com>
Sun, 10 Oct 1999 09:43:26 +0000 (02:43 -0700)
committerRichard Henderson <rth@gcc.gnu.org>
Sun, 10 Oct 1999 09:43:26 +0000 (02:43 -0700)
        * genrecog.c (add_to_sequence): Move allow_const_int test outside
        known predicate block; default allow_const_int true.

From-SVN: r29885

gcc/ChangeLog
gcc/genrecog.c

index adf51dfcccd9fbfe171fe4f77f0e100dbfeadc03..bdb5aeaad0475bc1ad7b9624774280ac0fb7b8c0 100644 (file)
@@ -1,3 +1,8 @@
+Sun Oct 10 02:41:41 1999  Richard Henderson  <rth@cygnus.com>
+
+       * genrecog.c (add_to_sequence): Move allow_const_int test outside
+       known predicate block; default allow_const_int true.
+
 Sun Oct 10 00:43:08 1999  Richard Henderson  <rth@cygnus.com>
 
        * i386.h (CC1_SPEC): Typo -- use cc1_cpu.
index 45cb3a3b1161b3f92c431ea234464f91760dc300..371e5b259cb2c57f278394de5e7dc859c78b28f1 100644 (file)
@@ -402,6 +402,7 @@ add_to_sequence (pattern, last, position, insn_type, top)
       {
        const char *pred_name;
        RTX_CODE was_code = code;
+       int allows_const_int = 1;
 
        if (code == MATCH_SCRATCH)
          {
@@ -462,10 +463,6 @@ add_to_sequence (pattern, last, position, insn_type, top)
                      allows_const_int = 1;
                      break;
                    }
-
-               /* Can't enforce a mode if we allow const_int.  */
-               if (allows_const_int)
-                 mode = VOIDmode;
              }
            else
              {
@@ -478,12 +475,10 @@ add_to_sequence (pattern, last, position, insn_type, top)
 #endif
              }
          }
-       else
-         {
-           /* Wildcard match.  Can't enforce a mode because we allow
-              anything -- const_int included.  */
-           mode = VOIDmode;
-         }
+
+       /* Can't enforce a mode if we allow const_int.  */
+       if (allows_const_int)
+         mode = VOIDmode;
 
        /* Accept the operand, ie. record it in `operands'.  */
        test = new_decision_test (DT_accept_op, &place);
@@ -2417,3 +2412,14 @@ debug_decision (d)
 {
   debug_decision_0 (d, 0, 1000000);
 }
+
+void
+debug_decision_list (d)
+     struct decision *d;
+{
+  while (d)
+    {
+      debug_decision_0 (d, 0, 0);
+      d = d->next;
+    }
+}