]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
genrecog.c (validate_pattern): Treat all messages except missing modes as errors.
authorRichard Sandiford <rdsandiford@googlemail.com>
Tue, 10 Dec 2013 18:28:51 +0000 (18:28 +0000)
committerRichard Sandiford <rsandifo@gcc.gnu.org>
Tue, 10 Dec 2013 18:28:51 +0000 (18:28 +0000)
gcc/
* genrecog.c (validate_pattern): Treat all messages except missing
modes as errors.
* config/epiphany/epiphany.md: Remove constraints from
define_peephole2s.
* config/h8300/h8300.md: Remove constraints from define_splits.
* config/msp430/msp430.md: Likewise.
* config/mcore/mcore.md (movdi_i, movsf_i, movdf_k): Use
nonimmediate_operand rather than general_operand for operand 0.
* config/moxie/moxie.md (*movsi, *movqi, *movhi): Likewise.
* config/pdp11/predicates.md (float_operand, float_nonimm_operand):
Use match_operator rather than match_test to invoke general_operand.
* config/v850/v850.md (*movqi_internal, *movhi_internal)
(*movsi_internal_v850e, *movsi_internal, *movsf_internal): Likewise.

From-SVN: r205870

gcc/ChangeLog
gcc/config/epiphany/epiphany.md
gcc/config/h8300/h8300.md
gcc/config/mcore/mcore.md
gcc/config/moxie/moxie.md
gcc/config/msp430/msp430.md
gcc/config/pdp11/predicates.md
gcc/config/v850/v850.md
gcc/genrecog.c

index 2c6dd41f87fc7de99d4c8a76b4182ae24028df1c..3264f7ab92a571a5ee92c04e156c1377023700ac 100644 (file)
@@ -1,3 +1,19 @@
+2013-12-10  Richard Sandiford  <rdsandiford@googlemail.com>
+
+       * genrecog.c (validate_pattern): Treat all messages except missing
+       modes as errors.
+       * config/epiphany/epiphany.md: Remove constraints from
+       define_peephole2s.
+       * config/h8300/h8300.md: Remove constraints from define_splits.
+       * config/msp430/msp430.md: Likewise.
+       * config/mcore/mcore.md (movdi_i, movsf_i, movdf_k): Use
+       nonimmediate_operand rather than general_operand for operand 0.
+       * config/moxie/moxie.md (*movsi, *movqi, *movhi): Likewise.
+       * config/pdp11/predicates.md (float_operand, float_nonimm_operand):
+       Use match_operator rather than match_test to invoke general_operand.
+       * config/v850/v850.md (*movqi_internal, *movhi_internal)
+       (*movsi_internal_v850e, *movsi_internal, *movsf_internal): Likewise.
+
 2013-12-10  Richard Sandiford  <rdsandiford@googlemail.com>
 
        * config/tilegx/tilegx.md (insn_ld_add<bitsuffix>): Use
index e8756ad8e23e3bc64a3662338a694ba6fcd2b916..fb7d6301adf631125e27ea897a2b56a7e8850c46 100644 (file)
 
 (define_peephole2
   [(parallel
-    [(set (match_operand:SI 0 "gpr_operand" "=r")
-         (logical_op:SI (match_operand:SI 1 "gpr_operand"  "r")
-                        (match_operand:SI 2 "gpr_operand" "%r")))
+    [(set (match_operand:SI 0 "gpr_operand")
+         (logical_op:SI (match_operand:SI 1 "gpr_operand")
+                        (match_operand:SI 2 "gpr_operand")))
      (clobber (reg:CC CC_REGNUM))])
    (parallel
     [(set (reg:CC CC_REGNUM)
          (compare:CC (and:SI (match_dup 0) (match_dup 0)) (const_int 0)))
-     (set (match_operand:SI 3 "gpr_operand" "=r")
+     (set (match_operand:SI 3 "gpr_operand")
          (and:SI (match_dup 0) (match_dup 0)))])]
   "peep2_reg_dead_p (2, operands[0])"
   [(parallel
 
 (define_peephole2
   [(parallel
-    [(set (match_operand:SI 0 "gpr_operand" "=r")
-         (logical_op:SI (match_operand:SI 1 "gpr_operand"  "r")
-                        (match_operand:SI 2 "gpr_operand" "%r")))
+    [(set (match_operand:SI 0 "gpr_operand")
+         (logical_op:SI (match_operand:SI 1 "gpr_operand")
+                        (match_operand:SI 2 "gpr_operand")))
      (clobber (reg:CC CC_REGNUM))])
    (parallel
     [(set (reg:CC CC_REGNUM)
          (compare:CC (and:SI (match_dup 0) (match_dup 0)) (const_int 0)))
-     (set (match_operand:SI 3 "gpr_operand" "=r")
+     (set (match_operand:SI 3 "gpr_operand")
          (and:SI (match_dup 0) (match_dup 0)))])]
   "peep2_reg_dead_p (2, operands[3])"
   [(parallel
 
 (define_peephole2
   [(parallel
-    [(set (match_operand:SI 0 "gpr_operand" "=r")
-         (logical_op:SI (match_operand:SI 1 "gpr_operand"  "r")
-                        (match_operand:SI 2 "gpr_operand" "%r")))
+    [(set (match_operand:SI 0 "gpr_operand")
+         (logical_op:SI (match_operand:SI 1 "gpr_operand")
+                        (match_operand:SI 2 "gpr_operand")))
      (clobber (reg:CC CC_REGNUM))])
    (parallel
     [(set (reg:CC CC_REGNUM)
          (compare:CC (match_dup 0) (const_int 0)))
-     (clobber (match_operand:SI 3 "gpr_operand" "=r"))])]
+     (clobber (match_operand:SI 3 "gpr_operand"))])]
   ""
   [(parallel
     [(set (reg:CC CC_REGNUM)
index 19b0d456a86075c762fcb5cdeee1cb48e61c4b05..3b07f5f8fd7d85c2fde1cdd91072d2ae9b40fe7d 100644 (file)
   [(set_attr "length" "8")])
 
 (define_split
-  [(set (match_operand:HI 0 "bit_register_indirect_operand" "=U")
-       (and:HI (match_operand:HI 1 "bit_register_indirect_operand" "%0")
-               (match_operand:HI 2 "single_zero_operand" "Y0")))]
+  [(set (match_operand:HI 0 "bit_register_indirect_operand")
+       (and:HI (match_operand:HI 1 "bit_register_indirect_operand")
+               (match_operand:HI 2 "single_zero_operand")))]
   "TARGET_H8300SX"
   [(set (match_dup 0)
        (and:QI (match_dup 1)
   [(set_attr "length" "8")])
 
 (define_split
-  [(set (match_operand:HI 0 "bit_register_indirect_operand" "=U")
-       (ior:HI (match_operand:HI 1 "bit_register_indirect_operand" "%0")
-               (match_operand:HI 2 "single_one_operand" "Y2")))]
+  [(set (match_operand:HI 0 "bit_register_indirect_operand")
+       (ior:HI (match_operand:HI 1 "bit_register_indirect_operand")
+               (match_operand:HI 2 "single_one_operand")))]
   "TARGET_H8300SX"
   [(set (match_dup 0)
        (ior:QI (match_dup 1)
   [(set_attr "length" "8")])
 
 (define_split
-  [(set (match_operand:HI 0 "bit_register_indirect_operand" "=U")
-       (xor:HI (match_operand:HI 1 "bit_register_indirect_operand" "%0")
-               (match_operand:HI 2 "single_one_operand" "Y2")))]
+  [(set (match_operand:HI 0 "bit_register_indirect_operand")
+       (xor:HI (match_operand:HI 1 "bit_register_indirect_operand")
+               (match_operand:HI 2 "single_one_operand")))]
   "TARGET_H8300SX"
   [(set (match_dup 0)
        (xor:QI (match_dup 1)
index c0568d338d57ee01bf71e319eae67469178e8115..9ac68c40644d8a9e37cccdae3228059dafc12e8b 100644 (file)
 }")
 
 (define_insn "movdi_i"
-  [(set (match_operand:DI 0 "general_operand" "=r,r,r,r,a,r,m")
+  [(set (match_operand:DI 0 "nonimmediate_operand" "=r,r,r,r,a,r,m")
        (match_operand:DI 1 "mcore_general_movsrc_operand" "I,M,N,r,R,m,r"))]
   ""
   "* return mcore_output_movedouble (operands, DImode);"
 }")
 
 (define_insn "movsf_i"
-  [(set (match_operand:SF 0 "general_operand" "=r,r,m")
+  [(set (match_operand:SF 0 "nonimmediate_operand" "=r,r,m")
        (match_operand:SF 1 "general_operand"  "r,m,r"))]
   ""
   "@
 }")
 
 (define_insn "movdf_k"
-  [(set (match_operand:DF 0 "general_operand" "=r,r,m")
+  [(set (match_operand:DF 0 "nonimmediate_operand" "=r,r,m")
        (match_operand:DF 1 "general_operand" "r,m,r"))]
   ""
   "* return mcore_output_movedouble (operands, DFmode);"
index 92f65c19c8a0fdd89e6110b8d0071841d89d51bf..2e6a699e9416129005e5f78341dfa583210ee3c5 100644 (file)
 }")
 
 (define_insn "*movsi"
-  [(set (match_operand:SI 0 "general_operand" "=r,r,r,W,A,r,r,B,r")
+  [(set (match_operand:SI 0 "nonimmediate_operand" "=r,r,r,W,A,r,r,B,r")
        (match_operand:SI 1 "moxie_general_movsrc_operand" "O,r,i,r,r,W,A,r,B"))]
   "register_operand (operands[0], SImode)
    || register_operand (operands[1], SImode)"
 }")
 
 (define_insn "*movqi"
-  [(set (match_operand:QI 0 "general_operand" "=r,r,r,W,A,r,r,B,r")
+  [(set (match_operand:QI 0 "nonimmediate_operand" "=r,r,r,W,A,r,r,B,r")
        (match_operand:QI 1 "moxie_general_movsrc_operand" "O,r,i,r,r,W,A,r,B"))]
   "register_operand (operands[0], QImode)
    || register_operand (operands[1], QImode)"
 }")
 
 (define_insn "*movhi"
-  [(set (match_operand:HI 0 "general_operand" "=r,r,r,W,A,r,r,B,r")
+  [(set (match_operand:HI 0 "nonimmediate_operand" "=r,r,r,W,A,r,r,B,r")
        (match_operand:HI 1 "moxie_general_movsrc_operand" "O,r,i,r,r,W,A,r,B"))]
   "(register_operand (operands[0], HImode)
     || register_operand (operands[1], HImode))"
index 22a3953bf97c9fdcd8d29808680b840498d000b9..6f9f2d3b288a402368dc3a579c6d3a3fc7cc675d 100644 (file)
 ; so that gcc knows when it can and can't optimize away the two
 ; halves.
 (define_split
-  [(set (match_operand:SI 0 "msp430_nonsubreg_operand" "=&rm")
-       (plus:SI (match_operand:SI 1 "nonimmediate_operand" "%0")
-                (match_operand:SI 2 "general_operand" "rmi")))
+  [(set (match_operand:SI 0 "msp430_nonsubreg_operand")
+       (plus:SI (match_operand:SI 1 "nonimmediate_operand")
+                (match_operand:SI 2 "general_operand")))
    ]
   ""
   [(parallel [(set (match_operand:HI 3 "nonimmediate_operand" "=&rm")
index 7ae9ee4f03d6b3e021926076f767a900ed2cd74b..e3b205187ae063145c0ebebb8f946a6590ea4655 100644 (file)
@@ -42,7 +42,7 @@
                (ior 
                 (match_test "REGNO_REG_CLASS (REGNO (op)) == LOAD_FPU_REGS")
                 (match_test "REGNO_REG_CLASS (REGNO (op)) == NO_LOAD_FPU_REGS"))
-               (match_test "general_operand (op, mode)")))
+               (match_operand 0 "general_operand")))
 
 ;; Accept anything nonimmediate_operand accepts, except that registers must
 ;; be FPU registers.
@@ -51,4 +51,4 @@
                (ior 
                 (match_test "REGNO_REG_CLASS (REGNO (op)) == LOAD_FPU_REGS")
                 (match_test "REGNO_REG_CLASS (REGNO (op)) == NO_LOAD_FPU_REGS"))
-               (match_test "nonimmediate_operand (op, mode)")))
+               (match_operand 0 "nonimmediate_operand")))
index f56d54a91a0c8207d78495ba9205b17398a3c0c2..213aedffa5748d786939181fbbb92d2c58968dce 100644 (file)
   })
 
 (define_insn "*movqi_internal"
-  [(set (match_operand:QI 0 "general_operand" "=r,r,r,Q,r,m,m")
+  [(set (match_operand:QI 0 "nonimmediate_operand" "=r,r,r,Q,r,m,m")
        (match_operand:QI 1 "general_operand" "Jr,n,Q,Ir,m,r,I"))]
   "register_operand (operands[0], QImode)
    || reg_or_0_operand (operands[1], QImode)"
 })
 
 (define_insn "*movhi_internal"
-  [(set (match_operand:HI 0 "general_operand" "=r,r,r,Q,r,m,m")
+  [(set (match_operand:HI 0 "nonimmediate_operand" "=r,r,r,Q,r,m,m")
        (match_operand:HI 1 "general_operand" "Jr,n,Q,Ir,m,r,I"))]
   "register_operand (operands[0], HImode)
    || reg_or_0_operand (operands[1], HImode)"
 ;; upper part with hi, and then put the lower part in the load/store insn.
 
 (define_insn "*movsi_internal_v850e"
-  [(set (match_operand:SI 0 "general_operand" "=r,r,r,r,Q,r,r,m,m,r")
+  [(set (match_operand:SI 0 "nonimmediate_operand" "=r,r,r,r,Q,r,r,m,m,r")
        (match_operand:SI 1 "general_operand" "Jr,K,L,Q,Ir,m,R,r,I,i"))]
   "(TARGET_V850E_UP)
    && (register_operand (operands[0], SImode)
    (set_attr "type" "other,other,other,load,other,load,other,store,store,other")])
 
 (define_insn "*movsi_internal"
-  [(set (match_operand:SI 0 "general_operand" "=r,r,r,r,Q,r,r,m,m")
+  [(set (match_operand:SI 0 "nonimmediate_operand" "=r,r,r,r,Q,r,r,m,m")
        (match_operand:SI 1 "movsi_source_operand" "Jr,K,L,Q,Ir,m,R,r,I"))]
   "register_operand (operands[0], SImode)
    || reg_or_0_operand (operands[1], SImode)"
    (set_attr "type" "other,other,other,load,other,load,store,store,other")])
 
 (define_insn "*movsf_internal"
-  [(set (match_operand:SF 0 "general_operand" "=r,r,r,r,r,Q,r,m,m,r")
+  [(set (match_operand:SF 0 "nonimmediate_operand" "=r,r,r,r,r,Q,r,m,m,r")
        (match_operand:SF 1 "general_operand" "Jr,K,L,n,Q,Ir,m,r,IG,iF"))]
   "register_operand (operands[0], SFmode)
    || reg_or_0_operand (operands[1], SFmode)"
index 814be7d17e39a35734066d1461d6f6e09ce108bc..663ab60167463d8e37d056b93015488719e38299 100644 (file)
@@ -457,9 +457,8 @@ validate_pattern (rtx pattern, rtx insn, rtx set, int set_code)
          {
            pred = lookup_predicate (pred_name);
            if (!pred)
-             message_with_line (pattern_lineno,
-                                "warning: unknown predicate '%s'",
-                                pred_name);
+             error_with_line (pattern_lineno, "unknown predicate '%s'",
+                              pred_name);
          }
        else
          pred = 0;
@@ -477,9 +476,9 @@ validate_pattern (rtx pattern, rtx insn, rtx set, int set_code)
                || GET_CODE (insn) == DEFINE_PEEPHOLE2)
              {
                if (constraints0)
-                 message_with_line (pattern_lineno,
-                                    "warning: constraints not supported in %s",
-                                    rtx_name[GET_CODE (insn)]);
+                 error_with_line (pattern_lineno,
+                                  "constraints not supported in %s",
+                                  rtx_name[GET_CODE (insn)]);
              }
 
            /* A MATCH_OPERAND that is a SET should have an output reload.  */
@@ -510,10 +509,9 @@ validate_pattern (rtx pattern, rtx insn, rtx set, int set_code)
           while not likely to occur at runtime, results in less efficient
           code from insn-recog.c.  */
        if (set && pred && pred->allows_non_lvalue)
-         message_with_line (pattern_lineno,
-                            "warning: destination operand %d "
-                            "allows non-lvalue",
-                            XINT (pattern, 0));
+         error_with_line (pattern_lineno,
+                          "destination operand %d allows non-lvalue",
+                          XINT (pattern, 0));
 
        /* A modeless MATCH_OPERAND can be handy when we can check for
           multiple modes in the c_test.  In most other cases, it is a
@@ -781,16 +779,16 @@ add_to_sequence (rtx pattern, struct decision_head *last,
                allows_const_int = pred->codes[CONST_INT];
                if (was_code == MATCH_PARALLEL
                    && pred->singleton != PARALLEL)
-                 message_with_line (pattern_lineno,
-                       "predicate '%s' used in match_parallel "
-                       "does not allow only PARALLEL", pred->name);
+                 error_with_line (pattern_lineno,
+                                  "predicate '%s' used in match_parallel "
+                                  "does not allow only PARALLEL", pred->name);
                else
                  code = pred->singleton;
              }
            else
-             message_with_line (pattern_lineno,
-                       "warning: unknown predicate '%s' in '%s' expression",
-                       pred_name, GET_RTX_NAME (was_code));
+             error_with_line (pattern_lineno,
+                              "unknown predicate '%s' in '%s' expression",
+                              pred_name, GET_RTX_NAME (was_code));
          }
 
        /* Can't enforce a mode if we allow const_int.  */