This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch] h8300.md: Add new patterns.


Hi,

Attached is a patch to add new patterns for the combiner to exploit.

Tested on h8300 port.  Committed.

Kazu Hirata

2002-12-04  Kazu Hirata  <kazu@cs.umass.edu>

	* config/h8300/h8300.md (*extzv_8_8): New.
	(*extzv_8_16): Likewise.

Index: h8300.md
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/h8300/h8300.md,v
retrieving revision 1.115
diff -u -r1.115 h8300.md
--- h8300.md	2 Dec 2002 14:24:11 -0000	1.115
+++ h8300.md	4 Dec 2002 20:51:52 -0000
@@ -2231,6 +2231,26 @@
 ;; COMBINE PATTERNS
 ;; -----------------------------------------------------------------
 
+(define_insn "*extzv_8_8"
+  [(set (match_operand:SI 0 "register_operand" "=r")
+	(zero_extract:SI (match_operand:SI 1 "register_operand" "r")
+			 (const_int 8)
+			 (const_int 8)))]
+  "TARGET_H8300H || TARGET_H8300S"
+  "mov.b\\t%x1,%w0\;extu.w\\t%f0\;extu.l\\t%S0"
+  [(set_attr "cc" "set_znv")
+   (set_attr "length" "6")])
+
+(define_insn "*extzv_8_16"
+  [(set (match_operand:SI 0 "register_operand" "=r")
+	(zero_extract:SI (match_operand:SI 1 "register_operand" "r")
+			 (const_int 8)
+			 (const_int 16)))]
+  "TARGET_H8300H || TARGET_H8300S"
+  "mov.w\\t%e1,%f0\;extu.w\\t%f0\;extu.l\\t%S0"
+  [(set_attr "cc" "set_znv")
+   (set_attr "length" "6")])
+
 (define_insn ""
   [(set (match_operand:HI 0 "register_operand" "=r")
 	(ior:HI (zero_extend:HI (match_operand:QI 1 "register_operand" "r"))


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]