Signed-off-by: Richard Henderson <richard.hender...@linaro.org> --- include/tcg/tcg.h | 2 +- tcg/tcg.c | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/include/tcg/tcg.h b/include/tcg/tcg.h index 467de19f58..d8591d6c9e 100644 --- a/include/tcg/tcg.h +++ b/include/tcg/tcg.h @@ -830,7 +830,7 @@ typedef struct TCGTargetOpDef { const char *args_ct_str[TCG_MAX_OP_ARGS]; } TCGTargetOpDef; -bool tcg_op_supported(TCGOpcode op); +bool tcg_op_supported(TCGOpcode op, TCGType type); void tcg_gen_call0(void *func, TCGHelperInfo *, TCGTemp *ret); void tcg_gen_call1(void *func, TCGHelperInfo *, TCGTemp *ret, TCGTemp *); diff --git a/tcg/tcg.c b/tcg/tcg.c index 8c76b876b5..3a0ad03fd5 100644 --- a/tcg/tcg.c +++ b/tcg/tcg.c @@ -1947,9 +1947,11 @@ TCGTemp *tcgv_i32_temp(TCGv_i32 v) } #endif /* CONFIG_DEBUG_TCG */ -/* Return true if OP may appear in the opcode stream. - Test the runtime variable that controls each opcode. */ -bool tcg_op_supported(TCGOpcode op) +/* + * Return true if OP may appear in the opcode stream with TYPE. + * Test the runtime variable that controls each opcode. + */ +bool tcg_op_supported(TCGOpcode op, TCGType type) { const bool have_vec = TCG_TARGET_HAS_v64 | TCG_TARGET_HAS_v128 | TCG_TARGET_HAS_v256; @@ -6259,7 +6261,7 @@ int tcg_gen_code(TCGContext *s, TranslationBlock *tb, uint64_t pc_start) /* fall through */ default: /* Sanity check that we've not introduced any unhandled opcodes. */ - tcg_debug_assert(tcg_op_supported(opc)); + tcg_debug_assert(tcg_op_supported(opc, op->type)); /* Note: in order to speed up the code, it would be much faster to have specialized register allocator functions for some common argument patterns */ -- 2.43.0