mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-08 10:13:56 -06:00
tcg: Replace TCGOP_VECL with TCGOP_TYPE
In the replacement, drop the TCGType - TCG_TYPE_V64 adjustment, except for the call to tcg_out_vec_op. Pass type to tcg_gen_op[1-6], so that all integer opcodes gain the type. Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
parent
125f97925d
commit
4d87221839
8 changed files with 105 additions and 93 deletions
11
tcg/tcg.c
11
tcg/tcg.c
|
@ -2616,7 +2616,8 @@ void tcg_dump_ops(TCGContext *s, FILE *f, bool have_prefs)
|
|||
nb_cargs = def->nb_cargs;
|
||||
|
||||
if (def->flags & TCG_OPF_VECTOR) {
|
||||
col += ne_fprintf(f, "v%d,e%d,", 64 << TCGOP_VECL(op),
|
||||
col += ne_fprintf(f, "v%d,e%d,",
|
||||
8 * tcg_type_size(TCGOP_TYPE(op)),
|
||||
8 << TCGOP_VECE(op));
|
||||
}
|
||||
|
||||
|
@ -4709,7 +4710,7 @@ static void tcg_reg_alloc_dup(TCGContext *s, const TCGOp *op)
|
|||
|
||||
itype = its->type;
|
||||
vece = TCGOP_VECE(op);
|
||||
vtype = TCGOP_VECL(op) + TCG_TYPE_V64;
|
||||
vtype = TCGOP_TYPE(op);
|
||||
|
||||
if (its->val_type == TEMP_VAL_CONST) {
|
||||
/* Propagate constant via movi -> dupi. */
|
||||
|
@ -5176,8 +5177,8 @@ static void tcg_reg_alloc_op(TCGContext *s, const TCGOp *op)
|
|||
break;
|
||||
default:
|
||||
if (def->flags & TCG_OPF_VECTOR) {
|
||||
tcg_out_vec_op(s, op->opc, TCGOP_VECL(op), TCGOP_VECE(op),
|
||||
new_args, const_args);
|
||||
tcg_out_vec_op(s, op->opc, TCGOP_TYPE(op) - TCG_TYPE_V64,
|
||||
TCGOP_VECE(op), new_args, const_args);
|
||||
} else {
|
||||
tcg_out_op(s, op->opc, new_args, const_args);
|
||||
}
|
||||
|
@ -5203,7 +5204,7 @@ static bool tcg_reg_alloc_dup2(TCGContext *s, const TCGOp *op)
|
|||
{
|
||||
const TCGLifeData arg_life = op->life;
|
||||
TCGTemp *ots, *itsl, *itsh;
|
||||
TCGType vtype = TCGOP_VECL(op) + TCG_TYPE_V64;
|
||||
TCGType vtype = TCGOP_TYPE(op);
|
||||
|
||||
/* This opcode is only valid for 32-bit hosts, for 64-bit elements. */
|
||||
tcg_debug_assert(TCG_TARGET_REG_BITS == 32);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue