On Tue, Dec 22, 2009 at 02:12:48PM +0000, Richard Earnshaw wrote: > There is. Look at attribute "enabled". > > I've not worked out how to use that properly yet, but it is used in the > m68k back-end.
Interesting. This seems to replace needing either (A) a bunch of similar patterns with different insn predicates, or (B) a bunch of new constraints that expand to "not available unless such and such ISA is enabled". That's a nice improvement, although we're back to the number of alternatives getting quite high. This does still leave us with weird operand predicates. For instance, in a patch I'm working on for ARM cmpdi patterns, I ended up needing "cmpdi_lhs_operand" and "cmpdi_rhs_operand" predicates because Cirrus and VFP targets accept different constants. Automatically generating that would be a bit excessive though. -- Daniel Jacobowitz CodeSourcery