tcg: Drop nargs from tcg_op_insert_{before,after}

It's unused since 75e8b9b7aa0b95a761b9add7e2f09248b101a392.

Backports commit ac1043f6d607aaac206c8aac42bc32f634f59395 from qemu
This commit is contained in:
Emilio G. Cota 2018-12-18 06:00:04 -05:00 committed by Lioncash
parent 7219548fbd
commit 0567c69235
No known key found for this signature in database
GPG key ID: 4E3C3CC1031BA9C7
3 changed files with 8 additions and 10 deletions

View file

@ -1260,7 +1260,7 @@ void tcg_optimize(TCGContext *s)
uint64_t a = ((uint64_t)ah << 32) | al; uint64_t a = ((uint64_t)ah << 32) | al;
uint64_t b = ((uint64_t)bh << 32) | bl; uint64_t b = ((uint64_t)bh << 32) | bl;
TCGArg rl, rh; TCGArg rl, rh;
TCGOp *op2 = tcg_op_insert_before(s, op, INDEX_op_movi_i32, 2); TCGOp *op2 = tcg_op_insert_before(s, op, INDEX_op_movi_i32);
if (opc == INDEX_op_add2_i32) { if (opc == INDEX_op_add2_i32) {
a += b; a += b;
@ -1282,7 +1282,7 @@ void tcg_optimize(TCGContext *s)
uint32_t b = arg_info(op->args[3])->val; uint32_t b = arg_info(op->args[3])->val;
uint64_t r = (uint64_t)a * b; uint64_t r = (uint64_t)a * b;
TCGArg rl, rh; TCGArg rl, rh;
TCGOp *op2 = tcg_op_insert_before(s, op, INDEX_op_movi_i32, 2); TCGOp *op2 = tcg_op_insert_before(s, op, INDEX_op_movi_i32);
rl = op->args[0]; rl = op->args[0];
rh = op->args[1]; rh = op->args[1];

View file

@ -1711,16 +1711,14 @@ TCGOp *tcg_emit_op(TCGContext *s, TCGOpcode opc)
return op; return op;
} }
TCGOp *tcg_op_insert_before(TCGContext *s, TCGOp *old_op, TCGOp *tcg_op_insert_before(TCGContext *s, TCGOp *old_op, TCGOpcode opc)
TCGOpcode opc, int nargs)
{ {
TCGOp *new_op = tcg_op_alloc(s, opc); TCGOp *new_op = tcg_op_alloc(s, opc);
QTAILQ_INSERT_BEFORE(old_op, new_op, link); QTAILQ_INSERT_BEFORE(old_op, new_op, link);
return new_op; return new_op;
} }
TCGOp *tcg_op_insert_after(TCGContext *s, TCGOp *old_op, TCGOp *tcg_op_insert_after(TCGContext *s, TCGOp *old_op, TCGOpcode opc)
TCGOpcode opc, int nargs)
{ {
TCGOp *new_op = tcg_op_alloc(s, opc); TCGOp *new_op = tcg_op_alloc(s, opc);
QTAILQ_INSERT_AFTER(&s->ops, old_op, new_op, link); QTAILQ_INSERT_AFTER(&s->ops, old_op, new_op, link);
@ -2088,7 +2086,7 @@ static bool liveness_pass_2(TCGContext *s)
TCGOpcode lopc = (arg_ts->type == TCG_TYPE_I32 TCGOpcode lopc = (arg_ts->type == TCG_TYPE_I32
? INDEX_op_ld_i32 ? INDEX_op_ld_i32
: INDEX_op_ld_i64); : INDEX_op_ld_i64);
TCGOp *lop = tcg_op_insert_before(s, op, lopc, 3); TCGOp *lop = tcg_op_insert_before(s, op, lopc);
lop->args[0] = temp_arg(dir_ts); lop->args[0] = temp_arg(dir_ts);
lop->args[1] = temp_arg(arg_ts->mem_base); lop->args[1] = temp_arg(arg_ts->mem_base);
@ -2157,7 +2155,7 @@ static bool liveness_pass_2(TCGContext *s)
TCGOpcode sopc = (arg_ts->type == TCG_TYPE_I32 TCGOpcode sopc = (arg_ts->type == TCG_TYPE_I32
? INDEX_op_st_i32 ? INDEX_op_st_i32
: INDEX_op_st_i64); : INDEX_op_st_i64);
TCGOp *sop = tcg_op_insert_after(s, op, sopc, 3); TCGOp *sop = tcg_op_insert_after(s, op, sopc);
sop->args[0] = temp_arg(dir_ts); sop->args[0] = temp_arg(dir_ts);
sop->args[1] = temp_arg(arg_ts->mem_base); sop->args[1] = temp_arg(arg_ts->mem_base);

View file

@ -1158,8 +1158,8 @@ void tcg_gen_callN(TCGContext *s, void *func, TCGTemp *ret, int nargs, TCGTemp *
TCGOp *tcg_emit_op(TCGContext *s, TCGOpcode opc); TCGOp *tcg_emit_op(TCGContext *s, TCGOpcode opc);
void tcg_op_remove(TCGContext *s, TCGOp *op); void tcg_op_remove(TCGContext *s, TCGOp *op);
TCGOp *tcg_op_insert_before(TCGContext *s, TCGOp *op, TCGOpcode opc, int narg); TCGOp *tcg_op_insert_before(TCGContext *s, TCGOp *op, TCGOpcode opc);
TCGOp *tcg_op_insert_after(TCGContext *s, TCGOp *op, TCGOpcode opc, int narg); TCGOp *tcg_op_insert_after(TCGContext *s, TCGOp *op, TCGOpcode opc);
void tcg_optimize(TCGContext *s); void tcg_optimize(TCGContext *s);