This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: MD file patterns and RTL templates
- From: Rask Ingemann Lambertsen <rask at sygehus dot dk>
- To: "BHASKAR G. REDDY" <bhaskar at cse dot iitb dot ac dot in>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Sat, 27 Jan 2007 20:44:49 +0100
- Subject: Re: MD file patterns and RTL templates
- References: <49976.10.129.41.10.1169919808.squirrel@www.cse.iitb.ac.in>
On Sat, Jan 27, 2007 at 11:13:28PM +0530, BHASKAR G. REDDY wrote:
>
> Hi,
> Is there any way to know, how a pattern in MD file is matched while
> generating code?
The program build/genrecog.c is compiled and run, generating insn-recog.c
which contains a decision tree to match RTL against the instruction patterns
in the machine description.
> But there are numerous other patterns in this md file which also
> generates and instruction when matched against RTL template.
It is quite normal since "andl" also sets the condition codes. This alone
makes for three patterns to output an "andl" instruction: One to describe
what happens to the destination operand, one to describe how the condition
codes are set and one to describe both of the above at the same time.
Additionally, "andl" may be used for clearing bit-fields.
--
Rask Ingemann Lambertsen