public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Problem in .md(Machine Description) file
@ 2003-08-22 11:26 nitin jain
  0 siblings, 0 replies; 4+ messages in thread
From: nitin jain @ 2003-08-22 11:26 UTC (permalink / raw)
  To: gcc-help

Hi,

I have to write a machine description file for a chip.
For that, i am trying to understand the structure and
systex of the machine description file of i386.

My problem is that why a 'define_insn' with a name
that start with '*' is used. Is it used for generating
RTL insn or for other purpose?

for example:
-------------------------------------------------
(define_insn "*cmphi_minus_1"
  [(set (reg 17)
        (compare (minus:HI (match_operand:HI 0
"nonimmediate_operand" "rm,r")
                           (match_operand:HI 1
"general_operand" "ri,mr"))
                 (const_int 0)))]
  "ix86_match_ccmode (insn, CCGOCmode)"
  "cmp{w}\t{%1, %0|%0, %1}"
  [(set_attr "type" "icmp")
   (set_attr "mode" "HI")])
--------------------------------------------------
If it is used to generate RTL insn then what is the
difference between this and 'define_insn' with name
that does not start with '*'.

Waitinf for a prompt reply.
Thanks in advance.


=====
-------------------------------------------------------------------
Nitin Jain,                       
H-8 ,Room No: 24
I.I.T.Bombay, Powai, Mumbai.
Mail-id: nitin-mbm@yahoo.com 
         nitinj@cse.iitb.ac.in
-------------------------------------------------------------------

__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

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

* RE: Problem in .md(Machine Description) file
@ 2003-08-25  8:23 Rakesh Kumar - Software, Noida
  0 siblings, 0 replies; 4+ messages in thread
From: Rakesh Kumar - Software, Noida @ 2003-08-25  8:23 UTC (permalink / raw)
  To: nitin jain, gcc-help

> This is what written in the GCC manual.
> My problem is that if these expressions are used to
> match generated RTL insn then
> 
> 1. What is the difference between these and the
> nameless 'define_insn'?
No difference, except that you would be able to know which nameless pattern
(the define_insn with *) is used to generate the RTL code. Without *, you
won't get what define_insn matched out of the nameless patterns. You see, it
only holds for debugging purposes.

> 
> 2. To match RTL code, that code should be generated by
> some other 'define_insn'.
> But the pattern in define_insn "*..." does not match
> with the other patterns in the whole .md file at all.
> This means that those RTL insn is not generated by any
> RTL expression
> in .md file. So what is the need to match them.
Sorry, I'm not able to get the point.......Please clarify

> 
> Waiting for reply.
> Nitin Jain
> CSE Dept. (IIT bombay)
>  
> > Regards,
> > Rakesh
> 
> 
> =====
> -------------------------------------------------------------------
> Nitin Jain,                       
> H-8 ,Room No: 24
> I.I.T.Bombay, Powai, Mumbai.
> Mail-id: nitin-mbm@yahoo.com 
>          nitinj@cse.iitb.ac.in
> -------------------------------------------------------------------
> 
> __________________________________
> Do you Yahoo!?
> Yahoo! SiteBuilder - Free, easy-to-use web site design software
> http://sitebuilder.yahoo.com
> 

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

* RE: Problem in .md(Machine Description) file
  2003-08-22 11:51 Rakesh Kumar - Software, Noida
@ 2003-08-24  9:54 ` nitin jain
  0 siblings, 0 replies; 4+ messages in thread
From: nitin jain @ 2003-08-24  9:54 UTC (permalink / raw)
  To: gcc-help; +Cc: Rakesh Kumar - Software, Noida

> > Hi,
> > 
> > I have to write a machine description file for a
> chip.
> > For that, i am trying to understand the structure
> and
> > systex of the machine description file of i386.
> > 
> > My problem is that why a 'define_insn' with a name
> > that start with '*' is used. Is it used for
> generating
> > RTL insn or for other purpose?
> 
> The * in insn name is used for identifying the
> instruction in RTL dumps.
> These are no different from the nameless pattern.

This is what written in the GCC manual.
My problem is that if these expressions are used to
match generated RTL insn then

1. What is the difference between these and the
nameless 'define_insn'?

2. To match RTL code, that code should be generated by
some other 'define_insn'.
But the pattern in define_insn "*..." does not match
with the other patterns in the whole .md file at all.
This means that those RTL insn is not generated by any
RTL expression
in .md file. So what is the need to match them.

Waiting for reply.
Nitin Jain
CSE Dept. (IIT bombay)
 
> Regards,
> Rakesh


=====
-------------------------------------------------------------------
Nitin Jain,                       
H-8 ,Room No: 24
I.I.T.Bombay, Powai, Mumbai.
Mail-id: nitin-mbm@yahoo.com 
         nitinj@cse.iitb.ac.in
-------------------------------------------------------------------

__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

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

* RE: Problem in .md(Machine Description) file
@ 2003-08-22 11:51 Rakesh Kumar - Software, Noida
  2003-08-24  9:54 ` nitin jain
  0 siblings, 1 reply; 4+ messages in thread
From: Rakesh Kumar - Software, Noida @ 2003-08-22 11:51 UTC (permalink / raw)
  To: nitin jain, gcc-help



> -----Original Message-----
> From: nitin jain [mailto:nitin_mbm@yahoo.com]
> Sent: Friday, August 22, 2003 4:56 PM
> To: gcc-help@gcc.gnu.org
> Subject: Problem in .md(Machine Description) file
> 
> 
> Hi,
> 
> I have to write a machine description file for a chip.
> For that, i am trying to understand the structure and
> systex of the machine description file of i386.
> 
> My problem is that why a 'define_insn' with a name
> that start with '*' is used. Is it used for generating
> RTL insn or for other purpose?

The * in insn name is used for identifying the instruction in RTL dumps.
These are no different from the nameless pattern.

Regards,
Rakesh

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

end of thread, other threads:[~2003-08-25  8:23 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-08-22 11:26 Problem in .md(Machine Description) file nitin jain
2003-08-22 11:51 Rakesh Kumar - Software, Noida
2003-08-24  9:54 ` nitin jain
2003-08-25  8:23 Rakesh Kumar - Software, Noida

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).