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 new pattern accepts

A |= B << 31;

where A and B are of unsigned long.

Tested on h8300 port.  Committed.

Kazu Hirata

2003-01-10  Kazu Hirata  <kazu@cs.umass.edu>

	* config/h8300/h8300.md (*iorsi3_ashift_31): New.

Index: h8300.md
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/h8300/h8300.md,v
retrieving revision 1.148
diff -u -r1.148 h8300.md
--- h8300.md	9 Jan 2003 14:59:01 -0000	1.148
+++ h8300.md	10 Jan 2003 14:53:47 -0000
@@ -2701,6 +2701,16 @@
   [(set_attr "cc" "clobber")
    (set_attr "length" "2")])
 
+(define_insn "*iorsi3_ashift_31"
+  [(set (match_operand:SI 0 "register_operand" "=&r")
+	(ior:SI (ashift:SI (match_operand:SI 1 "register_operand" "r")
+			   (const_int 31))
+		(match_operand:SI 2 "register_operand" "0")))]
+  "TARGET_H8300H || TARGET_H8300S"
+  "rotxl.l\\t%S0\;bor\\t#0,%w1\;rotxr.l\\t%S0"
+  [(set_attr "length" "6")
+   (set_attr "cc" "set_znv")])
+
 ;; Used to OR the exponent of a float.
 
 (define_insn "*iorsi3_shift"


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