redriver jiang <jiang.redri...@gmail.com> writes:

> But the constrains are really long.

Well, yeah.

> I use "U" for memory operands with address "R18+offset", and "S" for
> memory operands with address "R16" or "R17", and "Q" for memory
> operands with constant address(such as symbol ref, or const_int), the
> all combinations are as more as 43 types, and I have to change
> "MAX_RECOG_ALTERNATIVES" from "30" to be larger constants in
> "recog.h".
>
> (define_insn "*iorqi3_noimm_to_reg"
> [(set    (match_operand:QI 0 "register_mem_operand"
> "=r,r,r,r,r,r,r,r,r,r,r,r,r,U,U,U,S,S,S,Q,Q,Q,U,S,Q,U,U,U,U,U,U,S,S,S,S,S,S,Q,Q,Q,Q,Q,Q")
>         (ior:QI (match_operand:QI 1 "register_mem_operand"
> "%0,0,0,0,U,U,U,S,S,S,Q,Q,Q,r,r,r,r,r,r,r,r,r,r,r,r,U,U,U,S,Q,Q,U,U,U,S,Q,Q,U,U,U,S,Q,Q")
>                      (match_operand:QI 2 "register_mem_operand"
> "U,S,Q,r,U,S,Q,U,S,Q,U,S,Q,U,S,Q,U,S,Q,U,S,Q,r,r,r,U,S,Q,S,S,Q,U,S,Q,S,S,Q,U,S,Q,S,S,Q")))]
>  ""
>  "..."
>
> [( set_attr "length"
> "3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3"
> )
> ( set_attr "clobberb"
> "no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no"
> )])
>
>
> Is there any suggestions about this "long" constraints?

My only useful suggestion is that you can say
    (set_attr "length" "3")
    (set_attr "clobberb" "no")
You don't have to repeat the setting if it is the same for all
alternatives.

Ian

Reply via email to