]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR target/13380 (An unrecognized insn.)
authorKazu Hirata <kazu@cs.umass.edu>
Fri, 9 Jan 2004 15:47:03 +0000 (15:47 +0000)
committerKazu Hirata <kazu@gcc.gnu.org>
Fri, 9 Jan 2004 15:47:03 +0000 (15:47 +0000)
PR target/13380.
* config/m32r/m32r.md: Replace (reg:SI 17) with (reg:CC 17)
or (ne:SI (reg:CC 17) (const_int 0)).
Be specific about modes wherever possible.

From-SVN: r75586

gcc/ChangeLog
gcc/config/m32r/m32r.md

index 55f1f8a8c61575a15cdd51149b58b100a089f4fe..699591b10b018f80777475a8ea06766364657cd8 100644 (file)
@@ -1,3 +1,10 @@
+2004-01-09  Kazu Hirata  <kazu@cs.umass.edu>
+
+       PR target/13380.
+       * config/m32r/m32r.md: Replace (reg:SI 17) with (reg:CC 17)
+       or (ne:SI (reg:CC 17) (const_int 0)).
+       Be specific about modes wherever possible.
+
 2004-01-09  Kazu Hirata  <kazu@cs.umass.edu>
 
        * config/m32r/m32r.c (m32r_expand_block_move): Call
index 5a43ff74995157c15264e23725c80e15e06268c1..4949b2976aa16755c9fcd1e2b67161a38e24eb59 100644 (file)
 
 (define_insn "*load_sda_base"
   [(set (match_operand:SI 0 "register_operand" "=r")
-       (unspec [(const_int 0)] 2))]
+       (unspec:SI [(const_int 0)] 2))]
   ""
   "ld24 %0,#_SDA_BASE_"
   [(set_attr "type" "int4")
   [(set (match_operand:DI 0 "register_operand" "=r")
        (plus:DI (match_operand:DI 1 "register_operand" "%0")
                 (match_operand:DI 2 "register_operand" "r")))
-   (clobber (reg:SI 17))]
+   (clobber (reg:CC 17))]
   ""
   "#"
   [(set_attr "type" "multi")
   [(set (match_operand:DI 0 "register_operand" "")
        (plus:DI (match_operand:DI 1 "register_operand" "")
                 (match_operand:DI 2 "register_operand" "")))
-   (clobber (match_operand 3 "" ""))]
+   (clobber (reg:CC 17))]
   "reload_completed"
-  [(parallel [(set (match_dup 3)
+  [(parallel [(set (reg:CC 17)
                   (const_int 0))
              (use (match_dup 4))])
    (parallel [(set (match_dup 4)
                   (plus:SI (match_dup 4)
                            (plus:SI (match_dup 5)
-                                    (match_dup 3))))
-             (set (match_dup 3)
-                  (unspec [(const_int 0)] 3))])
+                                    (ne:SI (reg:CC 17) (const_int 0)))))
+             (set (reg:CC 17)
+                  (unspec:CC [(const_int 0)] 3))])
    (parallel [(set (match_dup 6)
                   (plus:SI (match_dup 6)
                            (plus:SI (match_dup 7)
-                                    (match_dup 3))))
-             (set (match_dup 3)
-                  (unspec [(const_int 0)] 3))])]
+                                    (ne:SI (reg:CC 17) (const_int 0)))))
+             (set (reg:CC 17)
+                  (unspec:CC [(const_int 0)] 3))])]
   "
 {
   operands[4] = operand_subword (operands[0], (WORDS_BIG_ENDIAN != 0), 0, DImode);
 }")
 
 (define_insn "*clear_c"
-  [(set (reg:SI 17)
+  [(set (reg:CC 17)
        (const_int 0))
    (use (match_operand:SI 0 "register_operand" "r"))]
   ""
   [(set (match_operand:SI 0 "register_operand" "=r")
        (plus:SI (match_operand:SI 1 "register_operand" "%0")
                 (plus:SI (match_operand:SI 2 "register_operand" "r")
-                         (reg:SI 17))))
-   (set (reg:SI 17)
-       (unspec [(const_int 0)] 3))]
+                         (ne:SI (reg:CC 17) (const_int 0)))))
+   (set (reg:CC 17)
+       (unspec:CC [(const_int 0)] 3))]
   ""
   "addx %0,%2"
   [(set_attr "type" "int2")
   [(set (match_operand:DI 0 "register_operand" "=r")
        (minus:DI (match_operand:DI 1 "register_operand" "0")
                  (match_operand:DI 2 "register_operand" "r")))
-   (clobber (reg:SI 17))]
+   (clobber (reg:CC 17))]
   ""
   "#"
   [(set_attr "type" "multi")
   [(set (match_operand:DI 0 "register_operand" "")
        (minus:DI (match_operand:DI 1 "register_operand" "")
                  (match_operand:DI 2 "register_operand" "")))
-   (clobber (match_operand 3 "" ""))]
+   (clobber (reg:CC 17))]
   "reload_completed"
-  [(parallel [(set (match_dup 3)
+  [(parallel [(set (reg:CC 17)
                   (const_int 0))
              (use (match_dup 4))])
    (parallel [(set (match_dup 4)
                   (minus:SI (match_dup 4)
                             (minus:SI (match_dup 5)
-                                      (match_dup 3))))
-             (set (match_dup 3)
-                  (unspec [(const_int 0)] 3))])
+                                      (ne:SI (reg:CC 17) (const_int 0)))))
+             (set (reg:CC 17)
+                  (unspec:CC [(const_int 0)] 3))])
    (parallel [(set (match_dup 6)
                   (minus:SI (match_dup 6)
                             (minus:SI (match_dup 7)
-                                      (match_dup 3))))
-             (set (match_dup 3)
-                  (unspec [(const_int 0)] 3))])]
+                                      (ne:SI (reg:CC 17) (const_int 0)))))
+             (set (reg:CC 17)
+                  (unspec:CC [(const_int 0)] 3))])]
   "
 {
   operands[4] = operand_subword (operands[0], (WORDS_BIG_ENDIAN != 0), 0, DImode);
   [(set (match_operand:SI 0 "register_operand" "=r")
        (minus:SI (match_operand:SI 1 "register_operand" "%0")
                  (minus:SI (match_operand:SI 2 "register_operand" "r")
-                           (reg:SI 17))))
-   (set (reg:SI 17)
-       (unspec [(const_int 0)] 3))]
+                           (ne:SI (reg:CC 17) (const_int 0)))))
+   (set (reg:CC 17)
+       (unspec:CC [(const_int 0)] 3))]
   ""
   "subx %0,%2"
   [(set_attr "type" "int2")
 ;; preferred.
 
 (define_expand "cmpsi"
-  [(set (reg:SI 17)
+  [(set (reg:CC 17)
        (compare:CC (match_operand:SI 0 "register_operand" "")
                    (match_operand:SI 1 "reg_or_cmp_int16_operand" "")))]
   ""
 }")
 
 (define_insn "cmp_eqsi_zero_insn"
-  [(set (reg:SI 17)
-        (eq:SI (match_operand:SI 0 "register_operand" "r,r")
+  [(set (reg:CC 17)
+        (eq:CC (match_operand:SI 0 "register_operand" "r,r")
                (match_operand:SI 1 "reg_or_zero_operand" "r,P")))]
   "TARGET_M32RX || TARGET_M32R2"
   "@
 ;; is quite inefficient.  However, it is rarely used.
 
 (define_insn "cmp_eqsi_insn"
-  [(set (reg:SI 17)
-        (eq:SI (match_operand:SI 0 "register_operand" "r,r")
+  [(set (reg:CC 17)
+        (eq:CC (match_operand:SI 0 "register_operand" "r,r")
                (match_operand:SI 1 "reg_or_cmp_int16_operand" "r,P")))
    (clobber (match_scratch:SI 2 "=&r,&r"))]
   ""
    (set_attr "length" "8,8")])
 
 (define_insn "cmp_ltsi_insn"
-  [(set (reg:SI 17)
-        (lt:SI (match_operand:SI 0 "register_operand" "r,r")
+  [(set (reg:CC 17)
+        (lt:CC (match_operand:SI 0 "register_operand" "r,r")
                (match_operand:SI 1 "reg_or_int16_operand" "r,J")))]
   ""
   "@
    (set_attr "length" "2,4")])
 
 (define_insn "cmp_ltusi_insn"
-  [(set (reg:SI 17)
-        (ltu:SI (match_operand:SI 0 "register_operand" "r,r")
+  [(set (reg:CC 17)
+        (ltu:CC (match_operand:SI 0 "register_operand" "r,r")
                 (match_operand:SI 1 "reg_or_int16_operand" "r,J")))]
   ""
   "@
   [(set (match_operand:SI 0 "register_operand" "=r")
        (eq:SI (match_operand:SI 1 "register_operand" "%r")
               (match_operand:SI 2 "reg_or_zero_operand" "rP")))
-   (clobber (reg:SI 17))]
+   (clobber (reg:CC 17))]
   "TARGET_M32RX || TARGET_M32R2"
   "#"
   [(set_attr "type" "multi")
   [(set (match_operand:SI 0 "register_operand" "")
        (eq:SI (match_operand:SI 1 "register_operand" "")
               (match_operand:SI 2 "reg_or_zero_operand" "")))
-   (clobber (reg:SI 17))]
+   (clobber (reg:CC 17))]
   "TARGET_M32RX || TARGET_M32R2"
-  [(set (reg:SI 17)
-       (eq:SI (match_dup 1)
+  [(set (reg:CC 17)
+       (eq:CC (match_dup 1)
               (match_dup 2)))
    (set (match_dup 0)
-       (reg:SI 17))]
+       (ne:SI (reg:CC 17) (const_int 0)))]
   "")
 
 (define_insn "seq_zero_insn"
   [(set (match_operand:SI 0 "register_operand" "=r")
        (eq:SI (match_operand:SI 1 "register_operand" "r")
               (const_int 0)))
-   (clobber (reg:SI 17))]
+   (clobber (reg:CC 17))]
   "TARGET_M32R"
   "#"
   [(set_attr "type" "multi")
   [(set (match_operand:SI 0 "register_operand" "")
        (eq:SI (match_operand:SI 1 "register_operand" "")
               (const_int 0)))
-   (clobber (reg:SI 17))]
+   (clobber (reg:CC 17))]
   "TARGET_M32R"
   [(match_dup 3)]
   "
   [(set (match_operand:SI 0 "register_operand" "=r,r,??r,r")
        (eq:SI (match_operand:SI 1 "register_operand" "r,r,r,r")
               (match_operand:SI 2 "reg_or_eq_int16_operand" "r,r,r,PK")))
-   (clobber (reg:SI 17))
+   (clobber (reg:CC 17))
    (clobber (match_scratch:SI 3 "=1,2,&r,r"))]
   "TARGET_M32R"
   "#"
   [(set (match_operand:SI 0 "register_operand" "")
        (eq:SI (match_operand:SI 1 "register_operand" "")
               (match_operand:SI 2 "reg_or_eq_int16_operand" "")))
-   (clobber (reg:SI 17))
+   (clobber (reg:CC 17))
    (clobber (match_scratch:SI 3 ""))]
   "TARGET_M32R && reload_completed"
   [(match_dup 4)]
   [(set (match_operand:SI 0 "register_operand" "=r")
        (ne:SI (match_operand:SI 1 "register_operand" "r")
               (const_int 0)))
-   (clobber (reg:SI 17))
+   (clobber (reg:CC 17))
    (clobber (match_scratch:SI 2 "=&r"))]
   ""
   "#"
   [(set (match_operand:SI 0 "register_operand" "")
        (ne:SI (match_operand:SI 1 "register_operand" "")
               (const_int 0)))
-   (clobber (reg:SI 17))
+   (clobber (reg:CC 17))
    (clobber (match_scratch:SI 2 ""))]
   "reload_completed"
   [(set (match_dup 2)
        (const_int 0))
-   (set (reg:SI 17)
-       (ltu:SI (match_dup 2)
+   (set (reg:CC 17)
+       (ltu:CC (match_dup 2)
                (match_dup 1)))
    (set (match_dup 0)
-       (reg:SI 17))]
+       (ne:SI (reg:CC 17) (const_int 0)))]
   "")
        
 (define_expand "slt"
   [(set (match_operand:SI 0 "register_operand" "=r,r")
        (lt:SI (match_operand:SI 1 "register_operand" "r,r")
               (match_operand:SI 2 "reg_or_int16_operand" "r,J")))
-   (clobber (reg:SI 17))]
+   (clobber (reg:CC 17))]
   ""
   "#"
   [(set_attr "type" "multi")
   [(set (match_operand:SI 0 "register_operand" "")
        (lt:SI (match_operand:SI 1 "register_operand" "")
               (match_operand:SI 2 "reg_or_int16_operand" "")))
-   (clobber (reg:SI 17))]
+   (clobber (reg:CC 17))]
   ""
-  [(set (reg:SI 17)
-       (lt:SI (match_dup 1)
+  [(set (reg:CC 17)
+       (lt:CC (match_dup 1)
               (match_dup 2)))
    (set (match_dup 0)
-       (reg:SI 17))]
+       (ne:SI (reg:CC 17) (const_int 0)))]
   "")
 
 (define_expand "sle"
   [(set (match_operand:SI 0 "register_operand" "=r")
        (le:SI (match_operand:SI 1 "register_operand" "r")
               (match_operand:SI 2 "register_operand" "r")))
-   (clobber (reg:SI 17))]
+   (clobber (reg:CC 17))]
   ""
   "#"
   [(set_attr "type" "multi")
   [(set (match_operand:SI 0 "register_operand" "")
        (le:SI (match_operand:SI 1 "register_operand" "")
               (match_operand:SI 2 "register_operand" "")))
-   (clobber (reg:SI 17))]
+   (clobber (reg:CC 17))]
   "!optimize_size"
-  [(set (reg:SI 17)
-       (lt:SI (match_dup 2)
+  [(set (reg:CC 17)
+       (lt:CC (match_dup 2)
               (match_dup 1)))
    (set (match_dup 0)
-       (reg:SI 17))
+       (ne:SI (reg:CC 17) (const_int 0)))
    (set (match_dup 0)
        (xor:SI (match_dup 0)
                (const_int 1)))]
   [(set (match_operand:SI 0 "register_operand" "")
        (le:SI (match_operand:SI 1 "register_operand" "")
               (match_operand:SI 2 "register_operand" "")))
-   (clobber (reg:SI 17))]
+   (clobber (reg:CC 17))]
   "optimize_size"
-  [(set (reg:SI 17)
-       (lt:SI (match_dup 2)
+  [(set (reg:CC 17)
+       (lt:CC (match_dup 2)
               (match_dup 1)))
    (set (match_dup 0)
-       (reg:SI 17))
+       (ne:SI (reg:CC 17) (const_int 0)))
    (set (match_dup 0)
        (plus:SI (match_dup 0)
                 (const_int -1)))
   [(set (match_operand:SI 0 "register_operand" "=r,r")
        (ge:SI (match_operand:SI 1 "register_operand" "r,r")
               (match_operand:SI 2 "reg_or_int16_operand" "r,J")))
-   (clobber (reg:SI 17))]
+   (clobber (reg:CC 17))]
   ""
   "#"
   [(set_attr "type" "multi")
   [(set (match_operand:SI 0 "register_operand" "")
        (ge:SI (match_operand:SI 1 "register_operand" "")
               (match_operand:SI 2 "reg_or_int16_operand" "")))
-   (clobber (reg:SI 17))]
+   (clobber (reg:CC 17))]
   "!optimize_size"
-  [(set (reg:SI 17)
-       (lt:SI (match_dup 1)
+  [(set (reg:CC 17)
+       (lt:CC (match_dup 1)
               (match_dup 2)))
    (set (match_dup 0)
-       (reg:SI 17))
+       (ne:SI (reg:CC 17) (const_int 0)))
    (set (match_dup 0)
        (xor:SI (match_dup 0)
                (const_int 1)))]
   [(set (match_operand:SI 0 "register_operand" "")
        (ge:SI (match_operand:SI 1 "register_operand" "")
               (match_operand:SI 2 "reg_or_int16_operand" "")))
-   (clobber (reg:SI 17))]
+   (clobber (reg:CC 17))]
   "optimize_size"
-  [(set (reg:SI 17)
-       (lt:SI (match_dup 1)
+  [(set (reg:CC 17)
+       (lt:CC (match_dup 1)
               (match_dup 2)))
    (set (match_dup 0)
-       (reg:SI 17))
+       (ne:SI (reg:CC 17) (const_int 0)))
    (set (match_dup 0)
        (plus:SI (match_dup 0)
                 (const_int -1)))
   [(set (match_operand:SI 0 "register_operand" "=r,r")
        (ltu:SI (match_operand:SI 1 "register_operand" "r,r")
                (match_operand:SI 2 "reg_or_int16_operand" "r,J")))
-   (clobber (reg:SI 17))]
+   (clobber (reg:CC 17))]
   ""
   "#"
   [(set_attr "type" "multi")
   [(set (match_operand:SI 0 "register_operand" "")
        (ltu:SI (match_operand:SI 1 "register_operand" "")
                (match_operand:SI 2 "reg_or_int16_operand" "")))
-   (clobber (reg:SI 17))]
+   (clobber (reg:CC 17))]
   ""
-  [(set (reg:SI 17)
-       (ltu:SI (match_dup 1)
+  [(set (reg:CC 17)
+       (ltu:CC (match_dup 1)
                (match_dup 2)))
    (set (match_dup 0)
-       (reg:SI 17))]
+       (ne:SI (reg:CC 17) (const_int 0)))]
   "")
 
 (define_expand "sleu"
   [(set (match_operand:SI 0 "register_operand" "=r")
        (leu:SI (match_operand:SI 1 "register_operand" "r")
                (match_operand:SI 2 "register_operand" "r")))
-   (clobber (reg:SI 17))]
+   (clobber (reg:CC 17))]
   ""
   "#"
   [(set_attr "type" "multi")
   [(set (match_operand:SI 0 "register_operand" "")
        (leu:SI (match_operand:SI 1 "register_operand" "")
                (match_operand:SI 2 "register_operand" "")))
-   (clobber (reg:SI 17))]
+   (clobber (reg:CC 17))]
   "!optimize_size"
-  [(set (reg:SI 17)
-       (ltu:SI (match_dup 2)
+  [(set (reg:CC 17)
+       (ltu:CC (match_dup 2)
                (match_dup 1)))
    (set (match_dup 0)
-       (reg:SI 17))
+       (ne:SI (reg:CC 17) (const_int 0)))
    (set (match_dup 0)
        (xor:SI (match_dup 0)
                (const_int 1)))]
   [(set (match_operand:SI 0 "register_operand" "")
        (leu:SI (match_operand:SI 1 "register_operand" "")
                (match_operand:SI 2 "register_operand" "")))
-   (clobber (reg:SI 17))]
+   (clobber (reg:CC 17))]
   "optimize_size"
-  [(set (reg:SI 17)
-       (ltu:SI (match_dup 2)
+  [(set (reg:CC 17)
+       (ltu:CC (match_dup 2)
                (match_dup 1)))
    (set (match_dup 0)
-       (reg:SI 17))
+       (ne:SI (reg:CC 17) (const_int 0)))
    (set (match_dup 0)
        (plus:SI (match_dup 0)
                 (const_int -1)))
   [(set (match_operand:SI 0 "register_operand" "=r,r")
        (geu:SI (match_operand:SI 1 "register_operand" "r,r")
                (match_operand:SI 2 "reg_or_int16_operand" "r,J")))
-   (clobber (reg:SI 17))]
+   (clobber (reg:CC 17))]
   ""
   "#"
   [(set_attr "type" "multi")
   [(set (match_operand:SI 0 "register_operand" "")
        (geu:SI (match_operand:SI 1 "register_operand" "")
                (match_operand:SI 2 "reg_or_int16_operand" "")))
-   (clobber (reg:SI 17))]
+   (clobber (reg:CC 17))]
   "!optimize_size"
-  [(set (reg:SI 17)
-       (ltu:SI (match_dup 1)
+  [(set (reg:CC 17)
+       (ltu:CC (match_dup 1)
                (match_dup 2)))
    (set (match_dup 0)
-       (reg:SI 17))
+       (ne:SI (reg:CC 17) (const_int 0)))
    (set (match_dup 0)
        (xor:SI (match_dup 0)
                (const_int 1)))]
   [(set (match_operand:SI 0 "register_operand" "")
        (geu:SI (match_operand:SI 1 "register_operand" "")
                (match_operand:SI 2 "reg_or_int16_operand" "")))
-   (clobber (reg:SI 17))]
+   (clobber (reg:CC 17))]
   "optimize_size"
-  [(set (reg:SI 17)
-       (ltu:SI (match_dup 1)
+  [(set (reg:CC 17)
+       (ltu:CC (match_dup 1)
                (match_dup 2)))
    (set (match_dup 0)
-       (reg:SI 17))
+       (ne:SI (reg:CC 17) (const_int 0)))
    (set (match_dup 0)
        (plus:SI (match_dup 0)
                 (const_int -1)))
 
 (define_insn "movcc_insn"
   [(set (match_operand:SI 0 "register_operand" "=r")
-       (reg:SI 17))]
+       (ne:SI (reg:CC 17) (const_int 0)))]
   ""
   "mvfc %0, cbr"
   [(set_attr "type" "misc")