]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
*** empty log message ***
authorRichard Kenner <kenner@gcc.gnu.org>
Sun, 1 Mar 1992 23:10:41 +0000 (18:10 -0500)
committerRichard Kenner <kenner@gcc.gnu.org>
Sun, 1 Mar 1992 23:10:41 +0000 (18:10 -0500)
From-SVN: r372

gcc/config/m68k/m68k.md

index b159df9ab3c6840ae99b996d28c1849e07f59eb5..df39ff27b6dd2cb54a65c02da09353b68361e6a5 100644 (file)
   return \"add%.w %2,%0\";
 }")
 
+;; These insns must use MATCH_DUP instead of the more expected
+;; use of a matching constraint because the "output" here is also
+;; an input, so you can't use the matching constraint.  That also means
+;; that you can't use the "%", so you need patterns with the matched
+;; operand in both positions.
+
 (define_insn ""
   [(set (strict_low_part (match_operand:HI 0 "general_operand" "+m,d"))
        (plus:HI (match_dup 0)
   ""
   "add%.w %1,%0")
 
+(define_insn ""
+  [(set (strict_low_part (match_operand:HI 0 "general_operand" "+m,d"))
+       (plus:HI (match_operand:HI 1 "general_operand" "dn,rmn")
+                (match_dup 0)))]
+  ""
+  "add%.w %1,%0")
+
 (define_insn "addqi3"
   [(set (match_operand:QI 0 "general_operand" "=m,d")
        (plus:QI (match_operand:QI 1 "general_operand" "%0,0")
   ""
   "add%.b %1,%0")
 
+(define_insn ""
+  [(set (strict_low_part (match_operand:QI 0 "general_operand" "+m,d"))
+       (plus:QI (match_operand:QI 1 "general_operand" "dn,dmn")
+                (match_dup 0)))]
+  ""
+  "add%.b %1,%0")
+
 (define_expand "adddf3"
   [(set (match_operand:DF 0 "general_operand" "")
        (plus:DF (match_operand:DF 1 "general_operand" "")
   ""
   "and%.w %2,%0")
 
+(define_insn ""
+  [(set (strict_low_part (match_operand:HI 0 "general_operand" "+m,d"))
+       (and:HI (match_dup 0)
+               (match_operand:HI 1 "general_operand" "dn,dmn")))]
+  ""
+  "and%.w %1,%0")
+
+(define_insn ""
+  [(set (strict_low_part (match_operand:HI 0 "general_operand" "+m,d"))
+       (and:HI (match_operand:HI 1 "general_operand" "dn,dmn")
+               (match_dup 0)))]
+  ""
+  "and%.w %1,%0")
+
 (define_insn "andqi3"
   [(set (match_operand:QI 0 "general_operand" "=m,d")
        (and:QI (match_operand:QI 1 "general_operand" "%0,0")
   ""
   "and%.b %2,%0")
 
+(define_insn ""
+  [(set (strict_low_part (match_operand:QI 0 "general_operand" "+m,d"))
+       (and:QI (match_dup 0)
+               (match_operand:QI 1 "general_operand" "dn,dmn")))]
+  ""
+  "and%.b %1,%0")
+
+(define_insn ""
+  [(set (strict_low_part (match_operand:QI 0 "general_operand" "+m,d"))
+       (and:QI (match_operand:QI 1 "general_operand" "dn,dmn")
+               (match_dup 0)))]
+  ""
+  "and%.b %1,%0")
 \f
 ;; inclusive-or instructions
 
   ""
   "or%.w %2,%0")
 
+(define_insn ""
+  [(set (strict_low_part (match_operand:HI 0 "general_operand" "+m,d"))
+       (ior:HI (match_dup 0)
+               (match_operand:HI 1 "general_operand" "dn,dmn")))]
+  ""
+  "or%.w %1,%0")
+
+(define_insn ""
+  [(set (strict_low_part (match_operand:HI 0 "general_operand" "+m,d"))
+       (ior:HI (match_operand:HI 1 "general_operand" "dn,dmn")
+               (match_dup 0)))]
+  ""
+  "or%.w %1,%0")
+
 (define_insn "iorqi3"
   [(set (match_operand:QI 0 "general_operand" "=m,d")
        (ior:QI (match_operand:QI 1 "general_operand" "%0,0")
                (match_operand:QI 2 "general_operand" "dn,dmn")))]
   ""
   "or%.b %2,%0")
+
+(define_insn ""
+  [(set (strict_low_part (match_operand:QI 0 "general_operand" "+m,d"))
+       (ior:QI (match_dup 0)
+               (match_operand:QI 1 "general_operand" "dn,dmn")))]
+  ""
+  "or%.b %1,%0")
+
+(define_insn ""
+  [(set (strict_low_part (match_operand:QI 0 "general_operand" "+m,d"))
+       (ior:QI (match_operand:QI 1 "general_operand" "dn,dmn")
+               (match_dup 0)))]
+  ""
+  "or%.b %1,%0")
 \f
 ;; xor instructions
 
   ""
   "eor%.w %2,%0")
 
+(define_insn ""
+  [(set (strict_low_part (match_operand:HI 0 "general_operand" "+dm"))
+       (xor:HI (match_dup 0)
+               (match_operand:HI 1 "general_operand" "dn")))]
+  ""
+  "eor%.w %1,%0")
+
+
+(define_insn ""
+  [(set (strict_low_part (match_operand:HI 0 "general_operand" "+dm"))
+       (xor:HI (match_operand:HI 1 "general_operand" "dn")
+               (match_dup 0)))]
+  ""
+  "eor%.w %1,%0")
+
 (define_insn "xorqi3"
   [(set (match_operand:QI 0 "general_operand" "=dm")
        (xor:QI (match_operand:QI 1 "general_operand" "%0")
                (match_operand:QI 2 "general_operand" "dn")))]
   ""
   "eor%.b %2,%0")
+
+(define_insn ""
+  [(set (strict_low_part (match_operand:QI 0 "general_operand" "+dm"))
+       (xor:QI (match_dup 0)
+               (match_operand:QI 1 "general_operand" "dn")))]
+  ""
+  "eor%.b %1,%0")
+
+(define_insn ""
+  [(set (strict_low_part (match_operand:QI 0 "general_operand" "+dm"))
+       (xor:QI (match_operand:QI 1 "general_operand" "dn")
+               (match_dup 0)))]
+  ""
+  "eor%.b %1,%0")
 \f
 ;; negation instructions
 
   ""
   "neg%.w %0")
 
+(define_insn ""
+  [(set (strict_low_part (match_operand:HI 0 "general_operand" "+dm"))
+       (neg:HI (match_dup 0)))]
+  ""
+  "neg%.w %0")
+
 (define_insn "negqi2"
   [(set (match_operand:QI 0 "general_operand" "=dm")
        (neg:QI (match_operand:QI 1 "general_operand" "0")))]
   ""
   "neg%.b %0")
 
+(define_insn ""
+  [(set (strict_low_part (match_operand:QI 0 "general_operand" "+dm"))
+       (neg:QI (match_dup 0)))]
+  ""
+  "neg%.b %0")
+
 (define_expand "negsf2"
   [(set (match_operand:SF 0 "general_operand" "")
        (neg:SF (match_operand:SF 1 "general_operand" "")))]
   ""
   "not%.w %0")
 
+(define_insn ""
+  [(set (strict_low_part (match_operand:HI 0 "general_operand" "+dm"))
+       (not:HI (match_dup 0)))]
+  ""
+  "not%.w %0")
+
 (define_insn "one_cmplqi2"
   [(set (match_operand:QI 0 "general_operand" "=dm")
        (not:QI (match_operand:QI 1 "general_operand" "0")))]
   ""
   "not%.b %0")
+
+(define_insn ""
+  [(set (strict_low_part (match_operand:QI 0 "general_operand" "+dm"))
+       (not:QI (match_dup 0)))]
+  ""
+  "not%.b %0")
 \f
 ;; arithmetic shift instructions
 ;; We don't need the shift memory by 1 bit instruction
   ""
   "asl%.w %2,%0")
 
+(define_insn ""
+  [(set (strict_low_part (match_operand:HI 0 "register_operand" "+d"))
+       (ashift:HI (match_dup 0)
+                  (match_operand:HI 1 "general_operand" "dI")))]
+  ""
+  "asl%.w %1,%0")
+
 (define_insn "ashlqi3"
   [(set (match_operand:QI 0 "register_operand" "=d")
        (ashift:QI (match_operand:QI 1 "register_operand" "0")
   ""
   "asl%.b %2,%0")
 
+(define_insn ""
+  [(set (strict_low_part (match_operand:QI 0 "register_operand" "+d"))
+       (ashift:QI (match_dup 0)
+                  (match_operand:QI 1 "general_operand" "dI")))]
+  ""
+  "asl%.b %1,%0")
+
 ;; On the 68000, this makes faster code in a special case.
 
 (define_insn ""
   ""
   "asr%.w %2,%0")
 
+(define_insn ""
+  [(set (strict_low_part (match_operand:HI 0 "register_operand" "+d"))
+       (ashiftrt:HI (match_dup 0)
+                    (match_operand:HI 1 "general_operand" "dI")))]
+  ""
+  "asr%.w %1,%0")
+
 (define_insn "ashrqi3"
   [(set (match_operand:QI 0 "register_operand" "=d")
        (ashiftrt:QI (match_operand:QI 1 "register_operand" "0")
                     (match_operand:QI 2 "general_operand" "dI")))]
   ""
   "asr%.b %2,%0")
+
+(define_insn ""
+  [(set (strict_low_part (match_operand:QI 0 "register_operand" "+d"))
+       (ashiftrt:QI (match_dup 0)
+                    (match_operand:QI 1 "general_operand" "dI")))]
+  ""
+  "asr%.b %1,%0")
 \f
 ;; logical shift instructions
 
   ""
   "lsl%.w %2,%0")
 
+(define_insn ""
+  [(set (strict_low_part (match_operand:HI 0 "register_operand" "+d"))
+       (lshift:HI (match_dup 0)
+                  (match_operand:HI 1 "general_operand" "dI")))]
+  ""
+  "lsl%.w %1,%0")
+
 (define_insn "lshlqi3"
   [(set (match_operand:QI 0 "register_operand" "=d")
        (lshift:QI (match_operand:QI 1 "register_operand" "0")
   ""
   "lsl%.b %2,%0")
 
+(define_insn ""
+  [(set (strict_low_part (match_operand:QI 0 "register_operand" "+d"))
+       (lshift:QI (match_dup 0)
+                  (match_operand:QI 1 "general_operand" "dI")))]
+  ""
+  "lsl%.b %1,%0")
+
 ;; On the 68000, this makes faster code in a special case.
 
 (define_insn ""
   ""
   "lsr%.w %2,%0")
 
+(define_insn ""
+  [(set (strict_low_part (match_operand:HI 0 "register_operand" "+d"))
+       (lshiftrt:HI (match_dup 0)
+                    (match_operand:HI 1 "general_operand" "dI")))]
+  ""
+  "lsr%.w %1,%0")
+
 (define_insn "lshrqi3"
   [(set (match_operand:QI 0 "register_operand" "=d")
        (lshiftrt:QI (match_operand:QI 1 "register_operand" "0")
                     (match_operand:QI 2 "general_operand" "dI")))]
   ""
   "lsr%.b %2,%0")
+
+(define_insn ""
+  [(set (strict_low_part (match_operand:QI 0 "register_operand" "+d"))
+       (lshiftrt:QI (match_dup 0)
+                    (match_operand:QI 1 "general_operand" "dI")))]
+  ""
+  "lsr%.b %1,%0")
 \f
 ;; rotate instructions
 
   ""
   "rol%.w %2,%0")
 
+
+(define_insn ""
+  [(set (strict_low_part (match_operand:HI 0 "register_operand" "+d"))
+       (rotate:HI (match_dup 0)
+                  (match_operand:HI 1 "general_operand" "dI")))]
+  ""
+  "rol%.w %1,%0")
+
 (define_insn "rotlqi3"
   [(set (match_operand:QI 0 "register_operand" "=d")
        (rotate:QI (match_operand:QI 1 "register_operand" "0")
   ""
   "rol%.b %2,%0")
 
+(define_insn ""
+  [(set (strict_low_part (match_operand:QI 0 "register_operand" "+d"))
+       (rotate:QI (match_dup 0)
+                  (match_operand:QI 1 "general_operand" "dI")))]
+  ""
+  "rol%.b %1,%0")
+
 (define_insn "rotrsi3"
   [(set (match_operand:SI 0 "register_operand" "=d")
        (rotatert:SI (match_operand:SI 1 "register_operand" "0")
   ""
   "ror%.w %2,%0")
 
+(define_insn ""
+  [(set (strict_low_part (match_operand:HI 0 "register_operand" "+d"))
+       (rotatert:HI (match_dup 0)
+                    (match_operand:HI 1 "general_operand" "dI")))]
+  ""
+  "ror%.w %1,%0")
+
 (define_insn "rotrqi3"
   [(set (match_operand:QI 0 "register_operand" "=d")
        (rotatert:QI (match_operand:QI 1 "register_operand" "0")
                     (match_operand:QI 2 "general_operand" "dI")))]
   ""
   "ror%.b %2,%0")
+
+(define_insn ""
+  [(set (strict_low_part (match_operand:QI 0 "register_operand" "+d"))
+       (rotatert:QI (match_dup 0)
+                    (match_operand:QI 1 "general_operand" "dI")))]
+  ""
+  "ror%.b %1,%0")
 \f
 ;; Special cases of bit-field insns which we should
 ;; recognize in preference to the general case.