* h8300.md (*andorhi3): New pattern.
authorJ"orn Rennecke <amylaar@redhat.com>
Thu, 30 Aug 2001 17:11:39 +0000 (17:11 +0000)
committerJoern Rennecke <amylaar@gcc.gnu.org>
Thu, 30 Aug 2001 17:11:39 +0000 (18:11 +0100)
From-SVN: r45289

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

index 3f1c2c6dfd88a1628acfdda407ad96516592940f..735a3a1f49f10b71d9ce43e95bf8d9c38736e8c9 100644 (file)
@@ -1,3 +1,7 @@
+Thu Aug 30 18:10:56 2001  J"orn Rennecke <amylaar@redhat.com>
+
+       * h8300.md (*andorhi3): New pattern.
+
 Thu Aug 30 16:00:31 2001  J"orn Rennecke <amylaar@redhat.com>
 
        * h8300.c (dosize): Fix test for "sub".
index 67b5a61f26dfa7616e4284d983d68ee87120b45b..8fb32711e2080cdc25526fa8c4193a695b97f7e4 100644 (file)
   [(set_attr "length" "2,4")
    (set_attr "cc" "set_znv,clobber")])
 
+(define_insn "*andorhi3"
+  [(set (match_operand:HI 0 "register_operand" "=r")
+       (ior:HI (and:HI (match_operand:HI 2 "register_operand" "r")
+                       (match_operand:HI 3 "p_operand" "P"))
+       (match_operand:HI 1 "register_operand" "0")))]
+  ""
+  "*
+{
+  if (INTVAL (operands[3]) > 128)
+    {
+      operands[3] = GEN_INT (INTVAL (operands[3]) >> 8);
+      return \"bld\t%V3,%t2\;bst\t%V3,%t0\";
+    }
+  return \"bld\t%V3,%s2\;bst\t%V3,%s0\";
+}"
+  [(set_attr "length" "4")
+   (set_attr "cc" "clobber")])
+
 (define_expand "andsi3"
   [(set (match_operand:SI 0 "register_operand" "")
        (and:SI (match_operand:SI 1 "register_operand" "")