>>>>> ibanez  writes:

ibanez> 2.)
ibanez> add_c   <-  add & update condition register

ibanez> But case 2 pattern is not used at all.

ibanez> (define_insn "..."
ibanez> [ (set (match_operand:SI 0 "register_operand" "=g")
ibanez> (plus:SI (match_operand:SI 1 "register_operand" "g")
ibanez> (match_operand:SI 2 "register_operand" "g")) )
ibanez> (set
ibanez> (reg:CC CC_REGNUM)
ibanez> (compare:CC (match_dup 0) (const_int 0)))]

        Try listing the compare first.  Also, you might try listing the
compare register as a match_operand with a constraint for the CC register
instead of hard-coding the register.  See rs6000.md add<mode>3_internal2
and add<mode>3_internal3 patterns for examples.

David

Reply via email to