This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
memory predicates and constraints
- From: Roman Zippel <zippel at linux-m68k dot org>
- To: gcc <gcc at gcc dot gnu dot org>
- Date: Sun, 25 Jul 2004 22:41:34 +0200
- Subject: 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