h8300.md (*insv_si_1_n): New.
authorKazu Hirata <kazu@cs.umass.edu>
Thu, 20 Mar 2003 21:12:01 +0000 (21:12 +0000)
committerKazu Hirata <kazu@gcc.gnu.org>
Thu, 20 Mar 2003 21:12:01 +0000 (21:12 +0000)
* config/h8300/h8300.md (*insv_si_1_n): New.
(*insv_si_1_n_lshiftrt): Likewise.

From-SVN: r64620

gcc/ChangeLog
gcc/config/h8300/h8300.md

index 2b16b1b..6f248a8 100644 (file)
@@ -1,3 +1,8 @@
+2003-03-20  Kazu Hirata  <kazu@cs.umass.edu>
+
+       * config/h8300/h8300.md (*insv_si_1_n): New.
+       (*insv_si_1_n_lshiftrt): Likewise.
+
 2003-03-20  Roger Sayle  <roger@eyesopen.com>
 
        * fold-const.c (fold_mathfn_compare): New function to simplify
index 50db771..dbe5446 100644 (file)
 ;; COMBINE PATTERNS
 ;; -----------------------------------------------------------------
 
+;; insv:SI
+
+(define_insn "*insv_si_1_n"
+  [(set (zero_extract:SI (match_operand:SI 0 "register_operand" "+r")
+                        (const_int 1)
+                        (match_operand:SI 1 "const_int_operand" "n"))
+       (match_operand:SI 2 "register_operand" "r"))]
+  "(TARGET_H8300H || TARGET_H8300S)
+   && INTVAL (operands[1]) < 16"
+  "bld\\t#0,%w2\;bst\\t%Z1,%Y0"
+  [(set_attr "cc" "clobber")
+   (set_attr "length" "4")])
+
+(define_insn "*insv_si_1_n_lshiftrt"
+  [(set (zero_extract:SI (match_operand:SI 0 "register_operand" "+r")
+                        (const_int 1)
+                        (match_operand:SI 1 "const_int_operand" "n"))
+       (lshiftrt:SI (match_operand:SI 2 "register_operand" "r")
+                    (match_operand:SI 3 "const_int_operand" "n")))]
+  "(TARGET_H8300H || TARGET_H8300S)
+   && INTVAL (operands[1]) < 16"
+  "bld\\t%Z3,%Y2\;bst\\t%Z1,%Y0"
+  [(set_attr "cc" "clobber")
+   (set_attr "length" "4")])
+
 ;; extzv:SI
 
 (define_insn "*extzv_8_8"