Richard Henderson <r...@redhat.com> writes: > On 03/31/2011 09:23 AM, Richard Sandiford wrote: >> +++ gcc/expr.c 2011-03-31 16:49:06.000000000 +0100 >> @@ -1293,11 +1293,7 @@ emit_block_move_via_movmem (rtx x, rtx y >> nice if there were some way to inform the backend, so >> that it doesn't fail the expansion because it thinks >> emitting the libcall would be more efficient. */ >> - nops = insn_data[(int) code].n_operands; >> - /* ??? n_operands includes match_scratches; find some other >> - way to select the 6 operand variant, or force all targets >> - to have exactly 6 operands. */ >> - gcc_assert (nops >= 4 && nops <= 6); >> + nops = insn_data[(int) code].n_generator_args; > > I think the assert should be retained (for now) as > > gcc_assert (nops == 4 || nops == 6); > > at least until we add such verification to some genfoo.
After the patch we have: gcc_assert (nops == (unsigned int) insn_data[(int) icode].n_generator_args); in maybe_gen_insn, which should catch this. Just to check: do you want the assertion here anyway? > Also, you've forgotten the setmem hunk. Gah. The movmem and setmem bits look so similar that I forgot there there two. Richard