]> gcc.gnu.org Git - gcc.git/commitdiff
h8300.md (*tstsi_upper_bit): New.
authorKazu Hirata <kazu@cs.umass.edu>
Sun, 9 Mar 2003 13:22:59 +0000 (13:22 +0000)
committerKazu Hirata <kazu@gcc.gnu.org>
Sun, 9 Mar 2003 13:22:59 +0000 (13:22 +0000)
* config/h8300/h8300.md (*tstsi_upper_bit): New.
(*iorsi3_e2f): Likewise.

From-SVN: r64026

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

index f4941cf541b6fb63e5c701cac61517a75f54e292..f82c118d4a109db57570d44bba975f1741efe514 100644 (file)
@@ -1,3 +1,8 @@
+2003-03-09  Kazu Hirata  <kazu@cs.umass.edu>
+
+       * config/h8300/h8300.md (*tstsi_upper_bit): New.
+       (*iorsi3_e2f): Likewise.
+
 2003-03-08  Kazu Hirata  <kazu@cs.umass.edu>
 
        * config/h8300/h8300.c (h8300_and_costs): Return the number of
index 0c7ab11b58163b2c7f09543365550b170226fb5f..4a97214e7ae3c7ad12b2c81b0f723e879f870d07 100644 (file)
   [(set_attr "length" "2")
    (set_attr "cc" "set_zn")])
 
+(define_insn_and_split "*tstsi_upper_bit"
+  [(set (cc0)
+       (zero_extract:SI (match_operand:SI 0 "register_operand" "r")
+                        (const_int 1)
+                        (match_operand 1 "const_int_operand" "n")))
+   (clobber (match_scratch:SI 2 "=&r"))]
+  "(TARGET_H8300H || TARGET_H8300S)
+   && INTVAL (operands[1]) >= 16"
+  "#"
+  "&& reload_completed"
+  [(set (match_dup 2)
+       (ior:SI (and:SI (match_dup 2)
+                       (const_int -65536))
+               (lshiftrt:SI (match_dup 0)
+                            (const_int 16))))
+   (set (cc0)
+       (zero_extract:SI (match_dup 2)
+                        (const_int 1)
+                        (match_dup 3)))]
+  "operands[3] = GEN_INT (INTVAL (operands[1]) - 16);")
+
 (define_insn ""
   [(set (cc0)
        (and:HI (match_operand:HI 0 "register_operand" "r")
   [(set_attr "cc" "clobber")
    (set_attr "length" "2")])
 
+(define_insn "*iorsi3_e2f"
+  [(set (match_operand:SI 0 "register_operand" "=r")
+       (ior:SI (and:SI (match_operand:SI 1 "register_operand" "0")
+                       (const_int -65536))
+               (lshiftrt:SI (match_operand:SI 2 "register_operand" "r")
+                            (const_int 16))))]
+  "TARGET_H8300H || TARGET_H8300S"
+  "mov.w\\t%e2,%f0"
+  [(set_attr "length" "2")
+   (set_attr "cc" "clobber")])
+
 (define_insn_and_split "*iorsi3_two_qi_sext"
   [(set (match_operand:SI 0 "register_operand" "=r")
        (ior:SI (zero_extend:SI (match_operand:QI 1 "register_operand" "0"))
This page took 0.104752 seconds and 5 git commands to generate.