This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [3/3] Record the number of generator arguments in insn_data
- From: Richard Henderson <rth at redhat dot com>
- To: gcc-patches at gcc dot gnu dot org, patches at linaro dot org, richard dot sandiford at linaro dot org
- Date: Thu, 31 Mar 2011 12:47:15 -0700
- Subject: Re: [3/3] Record the number of generator arguments in insn_data
- References: <g4aagbl0nm.fsf@linaro.org>
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.
Also, you've forgotten the setmem hunk.
r~