This is the mail archive of the
mailing list for the GCC project.
%0 and match_dup in .md
- From: Vimal Kumar <askgcc at yahoo dot com>
- To: gcc at gcc dot gnu dot org
- Date: Mon, 5 Jan 2004 04:06:29 -0800 (PST)
- Subject: %0 and match_dup in .md
I read MD manual for GCC and I got confused by the
functioning of '%' constraint modifier character and
match_dup in RTL template. The MD states:
'%' in constraint declares the instruction to be
commutative for this operand and the following
operand. This is often used in patterns for addition
instructions that really have two operands: the result
must go in one of the arguments. An example from
[(set (match_operand:HI 0 "general_operand" "=m,r")
(plus (match_operand:HI 1 "general_operand"
(match_operand:HI 2 "general_operand"
As far as I understand, it comes out that operand 0
and operand 1 are refering to the same expression. So,
why can't match_dup be used in place of operand 1? In
fact, I'm unable to figure out the differences between
the two. I may be missing something very important.
Regards and Thanks,
Do you Yahoo!?
New Yahoo! Photos - easier uploading and sharing.