Re: match_dup as internal operands

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



srimeruva@xxxxxxxxxxxxxx writes:

> what is the advantage of using match_dup for internal operands as
>
> (define_expand "zero_extendhisi2"
>  [(set (match_operand:SI 0 "register_operand" "")
>  (and:SI (subreg:SI
>  (match_operand:HI 1 "register_operand" "")
>  0)
>  (match_dup 2)))]
>  ""
>  "operands[2]
>     = force_reg (SImode, GEN_INT (65535)); ")

This would normally be used for a named pattern which does not expect
operand[2] to be filled in.  Since there is no operand[2], using a
match_operand does not make sense.  But since operand[2] needs to be
referenced in the generated pattern, it has to appear somehow.
match_dup is a reasonable compromise, because match_dup always matches.

Ian


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux