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 a new pattern.


Hi,

Attached is a patch to add a new pattern.

The pattern is triggered by (A >> 8) | B, where A and B are both
unsigned short.

Tested on h8300 port.  Committed.

Kazu Hirata

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

	* config/h8300/h8300.md (*iorhi_shift_8): Change the name to
	*iorhi_ashift_8.
	(*iorhi_lshiftrt_8): New.

Index: h8300.md
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/h8300/h8300.md,v
retrieving revision 1.133
diff -u -r1.133 h8300.md
--- h8300.md	25 Dec 2002 14:54:50 -0000	1.133
+++ h8300.md	28 Dec 2002 04:09:53 -0000
@@ -2407,13 +2407,23 @@
   [(set_attr "cc" "clobber")
    (set_attr "length" "2")])
 
-(define_insn "*iorhi_shift_8"
+(define_insn "*iorhi_ashift_8"
   [(set (match_operand:HI 0 "register_operand" "=r")
 	(ior:HI (ashift:HI (match_operand:HI 1 "register_operand" "r")
 			   (const_int 8))
 		(match_operand:HI 2 "register_operand" "0")))]
   ""
   "or.b\\t%s1,%t0"
+  [(set_attr "cc" "clobber")
+   (set_attr "length" "2")])
+
+(define_insn "*iorhi_lshiftrt_8"
+  [(set (match_operand:HI 0 "register_operand" "=r")
+	(ior:HI (lshiftrt:HI (match_operand:HI 1 "register_operand" "r")
+			     (const_int 8))
+		(match_operand:HI 2 "register_operand" "0")))]
+  ""
+  "or.b\t%t1,%s0"
   [(set_attr "cc" "clobber")
    (set_attr "length" "2")])
 


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