[patch] h8300 port: Add a pattern to be used with a combine.
Kazu Hirata
kazu@cs.umass.edu
Wed May 22 05:46:00 GMT 2002
Hi,
Attached is a patch to add a pattern to be used with a combine.
Testing with newlib shows several occurrences of this pattern.
Tested and committed.
Kazu Hirata
2002-05-22 Kazu Hirata <kazu@cs.umass.edu>
* config/h8300/h8300.md (*andorqi3): New.
Index: h8300.md
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/h8300/h8300.md,v
retrieving revision 1.83
diff -u -r1.83 h8300.md
--- h8300.md 2 Mar 2002 17:20:01 -0000 1.83
+++ h8300.md 21 May 2002 19:06:35 -0000
@@ -1033,6 +1033,20 @@
""
"")
+(define_insn "*andorqi3"
+ [(set (match_operand:QI 0 "register_operand" "=r")
+ (ior:QI (and:QI (match_operand:QI 2 "register_operand" "r")
+ (match_operand:QI 3 "const_int_operand" "n"))
+ (match_operand:QI 1 "register_operand" "0")))]
+ "exact_log2 (INTVAL (operands[3]) & 0xff) != -1"
+ "*
+{
+ operands[3] = GEN_INT (INTVAL (operands[3]) & 0xff);
+ return \"bld\\t%V3,%X2\;bst\\t%V3,%X0\";
+}"
+ [(set_attr "length" "4")
+ (set_attr "cc" "clobber")])
+
(define_insn "*andorhi3"
[(set (match_operand:HI 0 "register_operand" "=r")
(ior:HI (and:HI (match_operand:HI 2 "register_operand" "r")
More information about the Gcc-patches
mailing list