This is the mail archive of the crossgcc@sourceware.org mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: I don't understand the use of 'match_dup'


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]