On 03/25/2011 10:51 AM, Richard Sandiford wrote: > Thanks. I think it needs to be s/!= 4/>= 6/ though, so that > match_scratches still work when 6 operands really are passed in.
For the record, I audited all setmem and movmem patterns. There are is only one that uses 6 operands: i386. There are two that use 4 operands, but have 1 scratch: avr, pdp11. All the rest have exactly 4 operands. I'll leave the test as == 6 for now. > Fully agreed on the optional args thing. Or maybe insn_data should > have a separate "num_args" field. This is sounds like a good thing. It's probably worth doing some checking in some genfoo (opinit?) that the named patterns have exactly the number of operands expected. r~