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]

[m68k] Add ffssi2 pattern for MCF528x


Add the ffssi2 pattern for the Motorola ColdFire 528x target.
(based on Peter Barada's GCC 3.2.3 ColdFire patches)

This patch must be applied _after_ the previous two ColdFire
patches (both were approved but not yet committed to CVS).


2003-08-06  Peter Barada <peter@baradas.org>
	    Bernardo Innocenti  <bernie@develer.com>

	* config/m68k/m68kmd: Add ffssi2 pattern for 528x

diff -u -3 -p -u -p -r1.3 -r1.4
--- gcc-3.2.3/gcc/config/m68k/m68k.md	5 May 2003 20:00:50 -0000	1.3
+++ gcc-3.2.3/gcc/config/m68k/m68k.md	11 Aug 2003 13:43:55 -0000	1.4
@@ -7844,3 +7844,10 @@
   default: abort();
   }
 }")
+
+(define_insn "ffssi2"
+  [(set (match_operand:SI 0 "register_operand" "=&d")
+	(ffs:SI (match_operand:SI 1 "register_operand" "d")))
+   (clobber (match_scratch:SI 2 "=&d"))]
+  "TARGET_528x"
+  "move%.l %1,%2\;neg%.l %2,%2\;and.l %2,%2\;ff1%.l %2\;moveq%.l %#32,%0\;sub.l %2,%0")

-- 
  // Bernardo Innocenti - Develer S.r.l., R&D dept.
\X/  http://www.develer.com/

Please don't send Word attachments - http://www.gnu.org/philosophy/no-word-attachments.html



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