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]

[applied] add clz/dclz to mips.md


2003-05-23  Eric Christopher  <echristo@redhat.com>

	* config/mips/mips.md (clzsi, clzdi): New patterns.

-eric

-- 
Eric Christopher <echristo@redhat.com>


Index: config/mips/mips.md
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/mips/mips.md,v
retrieving revision 1.169
diff -u -p -w -r1.169 mips.md
--- config/mips/mips.md	19 May 2003 07:36:28 -0000	1.169
+++ config/mips/mips.md	23 May 2003 22:14:54 -0000
@@ -3594,6 +3594,31 @@ move\\t%0,%z4\\n\\
    (set_attr "length"	"24")])
 
 
+
+;;
+;;  ...................
+;;
+;;  Count leading zeroes.
+;;
+;;  ...................
+;;
+
+(define_insn "clzsi2"
+  [(set (match_operand:SI 0 "register_operand" "=d")
+	(clz:SI (match_operand:SI 1 "register_operand" "d")))]
+  "ISA_HAS_CLZ_CLO"
+  "clz\\t%0,%1"
+  [(set_attr "type" "arith")
+   (set_attr "mode" "SI")])
+
+(define_insn "clzdi2"
+  [(set (match_operand:DI 0 "register_operand" "=d")
+	(clz:DI (match_operand:DI 1 "register_operand" "d")))]
+  "ISA_HAS_DCLZ_DCLO"
+  "dclz\\t%0,%1"
+  [(set_attr "type" "arith")
+   (set_attr "mode" "DI")])
+
 ;;
 ;;  ....................
 ;;

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