mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-11 03:24:58 -06:00
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:
parent
ed1a653bad
commit
b277cdd20b
1 changed files with 4 additions and 0 deletions
|
@ -3367,6 +3367,10 @@ static const TCGArgConstraint *opcode_args_ct(const TCGOp *op)
|
||||||
const TCGOpDef *def = &tcg_op_defs[op->opc];
|
const TCGOpDef *def = &tcg_op_defs[op->opc];
|
||||||
TCGConstraintSetIndex con_set;
|
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) {
|
if (def->nb_iargs + def->nb_oargs == 0) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue