diff options
author | Richard Henderson <richard.henderson@linaro.org> | 2025-01-03 11:01:53 -0800 |
---|---|---|
committer | Richard Henderson <richard.henderson@linaro.org> | 2025-01-16 20:57:16 -0800 |
commit | b277cdd20baf6d8579aa5a874f713f9e19833c9f (patch) | |
tree | 3e948061cc7bb5b64002e191ee8a66327e722b72 /tcg | |
parent | ed1a653bad46752c4c4ceb2ada774dff7cd79e81 (diff) | |
download | qemu-b277cdd20baf6d8579aa5a874f713f9e19833c9f.zip qemu-b277cdd20baf6d8579aa5a874f713f9e19833c9f.tar.gz qemu-b277cdd20baf6d8579aa5a874f713f9e19833c9f.tar.bz2 |
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>
Diffstat (limited to 'tcg')
-rw-r--r-- | tcg/tcg.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -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; } |