This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Supporting 'MAC' instruction on gcc v4.1.1
- From: Rask Ingemann Lambertsen <rask at sygehus dot dk>
- To: Rahul <rah dot v dot ragh at gmail dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Fri, 11 May 2007 16:42:35 +0200
- Subject: Re: Supporting 'MAC' instruction on gcc v4.1.1
- References: <cf15b2ee0705110526t7e38b910lda4e58d375c4a9e4@mail.gmail.com>
On Fri, May 11, 2007 at 05:56:16PM +0530, Rahul wrote:
> I have PLUS, MULT and following MAC pattern, in my target.md file.
> (define_insn ""
> [(set (match_operand:SI 0 "data_reg" "=f")
> (plus:SI (mult:SI (match_operand:SI 1 "data_reg" "f")
> (match_operand:SI 2 "data_reg" "f"))
> (match_operand:SI 3 "data_reg" "0")))]
> ""
> "mac\\t%1, %2, %3"
> [(set_attr "type" "arith")
> (set_attr "length" "2")]
> )
>
> But for the following example
> int a = 1;
> int b = 2;
> int c = 3;
> c = c + a * b;
> the MAC pattern is not getting recognized, instead it is still using
> PLUS and MULT patterns.
See what is in the progname.c.*.combine file produced by
-fdump-rtl-combine.
Double check that your "data_reg" predicate is working.
You will make your life easier by giving the insn pattern a name. The RTL
dumps and in particular the -S -dp output will be easier to read.
--
Rask Ingemann Lambertsen