tcg: Pass number of arguments to tcg_emit_op() / tcg_op_insert_*()
authorPhilippe Mathieu-Daudé <philmd@linaro.org>
Sun, 18 Dec 2022 21:18:31 +0000 (22:18 +0100)
committerRichard Henderson <richard.henderson@linaro.org>
Thu, 5 Jan 2023 19:41:29 +0000 (11:41 -0800)
commitd44789434bbf51bb4d4a3402066d281fa0efc88c
tree36cdaedb9962bae66856e007f5d54320808fe517
parentf266bec890ead3864f1f5f9805112e0fd19c5066
tcg: Pass number of arguments to tcg_emit_op() / tcg_op_insert_*()

In order to have variable size allocated TCGOp, pass the number
of arguments we use (and would allocate) up to tcg_op_alloc().

This alters tcg_emit_op(), tcg_op_insert_before() and
tcg_op_insert_after() prototypes.

In tcg_op_alloc() ensure the number of arguments is in range.

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
[PMD: Extracted from bigger patch]
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-Id: <20221218211832.73312-2-philmd@linaro.org>
accel/tcg/plugin-gen.c
include/tcg/tcg-op.h
include/tcg/tcg.h
tcg/optimize.c
tcg/tcg-op-vec.c
tcg/tcg-op.c
tcg/tcg.c