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]

memory predicates and constraints


Hi,

I'm thinking about adding a few more predicates for m68k, which probably would help the combiner doing a better job instead having to reload the values later on.
m68k.md has now quite a number of very similiar pattern, which only differ in the supported memory modes, e.g. ColdFire has more restrictions when it comes to memory to memory moves. Is it possible to create a single pattern like:


(define_insn "movsi"
  [(set (match_operand:SI 0 "nonimmediate_operand" "=mr")
        (match_operand:SI 1 "general_operand" "g"))]
  "m68k_valid_move (operands[0], operands[1])"

m68k_valid_move would now reject all invalid combinations depending on the target. The basic question is now whether it's possible to keep the constraints in this case more generic than strictly needed without getting problems somewhere else?

bye, Roman


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