tcg: Validate op supported in opcode_args_ct

We should have checked that the op is supported before
emitting it.  The backend cannot be expected to have a
constraint set for unsupported ops.

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
Richard Henderson 2025-01-03 11:01:53 -08:00
parent ed1a653bad
commit b277cdd20b

View file

@ -3367,6 +3367,10 @@ static const TCGArgConstraint *opcode_args_ct(const TCGOp *op)
const TCGOpDef *def = &tcg_op_defs[op->opc];
TCGConstraintSetIndex con_set;
#ifdef CONFIG_DEBUG_TCG
assert(tcg_op_supported(op->opc, TCGOP_TYPE(op), TCGOP_FLAGS(op)));
#endif
if (def->nb_iargs + def->nb_oargs == 0) {
return NULL;
}