This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[m68k] Add ffssi2 pattern for MCF528x
- From: Bernardo Innocenti <bernie at develer dot com>
- To: gcc-patches at gcc dot gnu dot org
- Cc: Peter Barada <peter at baradas dot org>
- Date: Wed, 13 Aug 2003 02:10:52 +0200
- Subject: [m68k] Add ffssi2 pattern for MCF528x
- Organization: Develer S.r.l.
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