genrecog.c (validate_pattern): Typo last change.
authorRichard Henderson <rth@cygnus.com>
Thu, 14 Oct 1999 09:58:41 +0000 (02:58 -0700)
committerRichard Henderson <rth@gcc.gnu.org>
Thu, 14 Oct 1999 09:58:41 +0000 (02:58 -0700)
        * genrecog.c (validate_pattern): Typo last change.  Verify
        that output operands have output reloads.

From-SVN: r29968

gcc/ChangeLog
gcc/genrecog.c

index 82d762ad9d5de6e6a69cd1f8acd90b103a516c4c..f1266075d5064aaa36904c4d415136a1ce1a49fa 100644 (file)
@@ -1,3 +1,8 @@
+Thu Oct 14 02:57:05 1999  Richard Henderson  <rth@cygnus.com>
+
+       * genrecog.c (validate_pattern): Typo last change.  Verify
+       that output operands have output reloads.
+
 Thu Oct 14 01:49:54 1999  Richard Henderson  <rth@cygnus.com>
 
        * genrecog.c (special_mode_pred_table): New.
index f36e8796576808fa0ef7f8f9e6c0db50b9564e38..36362151176228befd2127e0647fb1845cc72e6b 100644 (file)
@@ -525,7 +525,7 @@ validate_pattern (pattern, insn, set_dest)
            && pred_name[0] != '\0'
            && allows_non_const
            && ! special_mode_pred
-           && strstr (c_test, "operands") != NULL
+           && strstr (c_test, "operands") == NULL
            && GET_CODE (insn) == DEFINE_INSN)
          {
            message_with_line (pattern_lineno,
@@ -533,6 +533,19 @@ validate_pattern (pattern, insn, set_dest)
                               XINT (pattern, 0));
          }
 
+       /* A MATCH_OPERAND that is a SET should have an output reload.  */
+       if (set_dest
+           && code == MATCH_OPERAND
+           && XSTR (pattern, 2)[0] != '\0'
+           && XSTR (pattern, 2)[0] != '='
+           && XSTR (pattern, 2)[0] != '+')
+         {
+           message_with_line (pattern_lineno,
+                              "operand %d missing output reload", 
+                              XINT (pattern, 0));
+           error_count++;
+         }
+
        return;
       }