This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [m68k] Add ffssi2 pattern for MCF528x
- From: Bernardo Innocenti <bernie at develer dot com>
- To: Richard Henderson <rth at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org,Peter Barada <peter at baradas dot org>
- Date: Thu, 14 Aug 2003 02:50:25 +0200
- Subject: Re: [m68k] Add ffssi2 pattern for MCF528x
- Organization: Develer S.r.l.
- References: <200308130210.52659.bernie@develer.com> <20030814002101.GD26172@redhat.com>
On Thursday 14 August 2003 02:21, Richard Henderson wrote:
> On Wed, Aug 13, 2003 at 02:10:52AM +0200, Bernardo Innocenti wrote:
> > This patch must be applied _after_ the previous two ColdFire
> > patches (both were approved but not yet committed to CVS).
>
> Have you applied for cvs write access?
Not yet. May I put you as my sponsor in the request form, please?
> > * config/m68k/m68kmd: Add ffssi2 pattern for 528x
>
> Well, I guess. But really you want to add ctz patterns. I suggest
>
> (define_insn "*ff1"
> [(set (match_operand:SI 0 "register_operand" "=d")
> (ctz:SI (not:SI (match_operand:SI 1 "register_operand" "0"))))]
> ""
> "ff1%.l %0")
>
> (define_expand "ctxsi2"
> [(set (match_dup 2)
> (not:SI (match_operand:SI 1 "register_operand" "")))
> (set (match_operand:SI 0 "register_operand" "=d")
> (ctz:SI (not:SI (match_dup 2))))]
> ""
> {
> operands[2] = gen_reg_rtx (SImode);
> })
>
> Then add a ffssi2 expander that uses these patterns.
Unfortunately, I can't test on a 528x. Peter, what do you think?
--
// 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