This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[patch] h8300.md: Add a new pattern.
- From: Kazu Hirata <kazu at cs dot umass dot edu>
- To: gcc-patches at gcc dot gnu dot org
- Date: Sat, 08 Mar 2003 08:28:09 -0500 (EST)
- Subject: [patch] h8300.md: Add a new pattern.
Hi,
Attached is a patch to add a pattern that extracts 16 bits starting
from bit 8.
Tested on h8300 port. Committed.
Kazu Hirata
2003-03-08 Kazu Hirata <kazu at cs dot umass dot edu>
* config/h8300/h8300.md (*extzv_16_8): New.
Index: h8300.md
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/h8300/h8300.md,v
retrieving revision 1.190
diff -u -r1.190 h8300.md
--- h8300.md 7 Mar 2003 01:37:49 -0000 1.190
+++ h8300.md 8 Mar 2003 13:12:03 -0000
@@ -2646,6 +2646,17 @@
[(set_attr "cc" "set_znv")
(set_attr "length" "6")])
+(define_insn "*extzv_16_8"
+ [(set (match_operand:SI 0 "register_operand" "=r")
+ (zero_extract:SI (match_operand:SI 1 "register_operand" "r")
+ (const_int 16)
+ (const_int 8)))
+ (clobber (match_scratch:SI 2 "=&r"))]
+ "TARGET_H8300H"
+ "mov.w\\t%e1,%f2\;mov.b\\t%x1,%w0\;mov.b\\t%w2,%x0\;extu.l\\t%S0"
+ [(set_attr "length" "8")
+ (set_attr "cc" "set_znv")])
+
;; Extract the exponent of a float.
(define_insn_and_split "*extzv_8_23"