On Fri, Oct 24, 2008 at 09:40:52PM -0400, Hans-Peter Nilsson wrote: > Sounds like a perfect use for the new feature attribute-enabled; > skipping alternatives depending on TARGET_... See md.texi > "@subsection Disable insn alternatives using the @code{enabled} > attribute".
Thanks for the pointer, an interesting new feature. It's better than exploding the machine description with iterators, but it still causes code duplication: I want the same alternatives to be available, only I don't want reload to fix up instructions according to them; but when a match is present, it is supposed to keep it, and later the alternative should drive instruction output. To do this with the enabled attribute I would have to have one copy of the alternative for active reloading, controlled by the enabled attribute, and another one for passive recognition by reload and instruction output (which could use a constant cost modifier to make it passive).