This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


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: generating compare and branch instructions


On Tuesday 09 November 2004 07:37, Øyvind Harboe wrote:
> I've read the documentation of "match_dup" and I can't understand what
> "match_dup 1" referes to in the .md code below.

It refers to operands[1], which is set by the C code fragment. Note that this 
is a define_expand, not a define_insn, so the pattern is only used for 
creating new insns, not matching existing ones.

See 
http://gcc.gnu.org/onlinedocs/gccint/Expander-Definitions.html#Expander-Definitions

Paul

> (define_expand "beq"
>   [(set (pc)
>  (if_then_else (eq (match_dup 1) (const_int 0))
>         (label_ref (match_operand 0 "" ""))
>         (pc)))]


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