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]

rtl questions


Still feeling my way around...

1) Could someone expalin how the the rtl template actually matches an
insn? is it like a regular expression? or something smarter than that?
for example in the arm.md I see
(define_expand "movesi"
  [(set (match_operand:SI 0 "general_operand" "")
        (match_operand:SI 1 "general_operand" ""))]
   ...
And this is supposed to match the private define_insn:

(define_insn "*movesi_insn"
  [(set (match_operand:SI 0 "general_operand" "=r,r,r,m")
        (match_operand:SI 1 "general_operand" "rI,K,mi,r"))]
   ...

So obviously the constraints don't count in the matching here(?). But
how about the predicates? would a "memory_operand" that is less general
than a "general_operand" match?
i.e. would this match the define_insn above?

(define_expand "movesi"
  [(set (match_operand:SI 0 "memory_operand" "")
        (match_operand:SI 1 "general_operand" ""))]
   ...


2) Is it absolutley necessary to have a matching define_insn for a
define_expand? I cannot find any for say the cmpsi pattern in the pj.md
or is it that I don't understand how the matching works (question 1
above)?

Thanks,
 Bahman


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