public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Help in pointing to correct pattern in md file
@ 2010-03-01  6:16 rohitgeek
  2010-03-01 21:23 ` Ian Lance Taylor
  0 siblings, 1 reply; 2+ messages in thread
From: rohitgeek @ 2010-03-01  6:16 UTC (permalink / raw)
  To: gcc-help



I am trying on ARM processor to check on how complex instruction works, but
not getting the expected result.

In arm.md, a pattern for MLA instruction is present which should be used to
emit the instruction " mla  ________ " if i write the test code as : -

main()
  {
  int a,b,c;
  a=10; b=5; c=7;
  a = b*c +b;  //MLA
}

The result is that i get two different instructions. What should in done in
md files or build/compile time to support these kind of instructions.

Thanks
-- 
View this message in context: http://old.nabble.com/Help-in-pointing-to-correct-pattern-in-md-file-tp27740461p27740461.html
Sent from the gcc - Help mailing list archive at Nabble.com.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Help in pointing to correct pattern in md file
  2010-03-01  6:16 Help in pointing to correct pattern in md file rohitgeek
@ 2010-03-01 21:23 ` Ian Lance Taylor
  0 siblings, 0 replies; 2+ messages in thread
From: Ian Lance Taylor @ 2010-03-01 21:23 UTC (permalink / raw)
  To: rohitgeek; +Cc: gcc-help

rohitgeek <rohit23taneja@gmail.com> writes:

> In arm.md, a pattern for MLA instruction is present which should be used to
> emit the instruction " mla  ________ " if i write the test code as : -
>
> main()
>   {
>   int a,b,c;
>   a=10; b=5; c=7;
>   a = b*c +b;  //MLA
> }
>
> The result is that i get two different instructions. What should in done in
> md files or build/compile time to support these kind of instructions.

I see the mla instruction if I compile this file:

int foo(int a, int b, int c) { return a * b + c; }

with an ARM compiler with -O2.

Ian

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-03-01 21:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-03-01  6:16 Help in pointing to correct pattern in md file rohitgeek
2010-03-01 21:23 ` Ian Lance Taylor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).