I don't understand the use of 'match_dup'
Ken Rose
kenrose@tfb.com
Thu Feb 2 16:58:00 GMT 2006
ZengNan wrote:
> I don't understand the use of match_dup, even if I've read GCC Internals. For example, in mips.md,
>
> (define_expand "seq"
> [(set (match_operand:SI 0 "register_operand" "=d")
> (eq:SI (match_dup 1) (match_dup 2)))]
> ....
It means that the corresponding parameters are exactly the same as
parameters 1 and 2. In a define_insn, they'd be in the pattern, but in
define_expand, they're often generated in the body of the definition,
where operands[1] and operands[2] are defined.
> and in i386.md,
>
> (define_expend "seq"
> [(match_dup 1)
> (set (match_operand:QI 0 "register_operand" "")
> (eq:QI (cc0) (const_int 0)))]
> ......
>
> What does "match_dup" means in the two patterns?
Similarly here.
- ken
------
Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.org
More information about the crossgcc
mailing list