[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [RFC v2 08/38] tcg: drop nargs from tcg_op_insert_{before,
From: |
Emilio G. Cota |
Subject: |
[Qemu-devel] [RFC v2 08/38] tcg: drop nargs from tcg_op_insert_{before, after} |
Date: |
Sun, 9 Dec 2018 14:37:19 -0500 |
It's unused.
Signed-off-by: Emilio G. Cota <address@hidden>
---
tcg/tcg.h | 4 ++--
tcg/optimize.c | 4 ++--
tcg/tcg.c | 10 ++++------
3 files changed, 8 insertions(+), 10 deletions(-)
diff --git a/tcg/tcg.h b/tcg/tcg.h
index f4efbaa680..a745e926bb 100644
--- a/tcg/tcg.h
+++ b/tcg/tcg.h
@@ -1073,8 +1073,8 @@ void tcg_gen_callN(void *func, TCGTemp *ret, int nargs,
TCGTemp **args);
TCGOp *tcg_emit_op(TCGOpcode opc);
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_after(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);
void tcg_optimize(TCGContext *s);
diff --git a/tcg/optimize.c b/tcg/optimize.c
index 5dbe11c3c8..a2247f6de3 100644
--- a/tcg/optimize.c
+++ b/tcg/optimize.c
@@ -1249,7 +1249,7 @@ void tcg_optimize(TCGContext *s)
uint64_t a = ((uint64_t)ah << 32) | al;
uint64_t b = ((uint64_t)bh << 32) | bl;
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) {
a += b;
@@ -1271,7 +1271,7 @@ void tcg_optimize(TCGContext *s)
uint32_t b = arg_info(op->args[3])->val;
uint64_t r = (uint64_t)a * b;
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];
rh = op->args[1];
diff --git a/tcg/tcg.c b/tcg/tcg.c
index e85133ef05..e87c662a18 100644
--- a/tcg/tcg.c
+++ b/tcg/tcg.c
@@ -2203,16 +2203,14 @@ TCGOp *tcg_emit_op(TCGOpcode opc)
return op;
}
-TCGOp *tcg_op_insert_before(TCGContext *s, TCGOp *old_op,
- TCGOpcode opc, int nargs)
+TCGOp *tcg_op_insert_before(TCGContext *s, TCGOp *old_op, TCGOpcode opc)
{
TCGOp *new_op = tcg_op_alloc(opc);
QTAILQ_INSERT_BEFORE(old_op, new_op, link);
return new_op;
}
-TCGOp *tcg_op_insert_after(TCGContext *s, TCGOp *old_op,
- TCGOpcode opc, int nargs)
+TCGOp *tcg_op_insert_after(TCGContext *s, TCGOp *old_op, TCGOpcode opc)
{
TCGOp *new_op = tcg_op_alloc(opc);
QTAILQ_INSERT_AFTER(&s->ops, old_op, new_op, link);
@@ -2550,7 +2548,7 @@ static bool liveness_pass_2(TCGContext *s)
TCGOpcode lopc = (arg_ts->type == TCG_TYPE_I32
? INDEX_op_ld_i32
: 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[1] = temp_arg(arg_ts->mem_base);
@@ -2619,7 +2617,7 @@ static bool liveness_pass_2(TCGContext *s)
TCGOpcode sopc = (arg_ts->type == TCG_TYPE_I32
? INDEX_op_st_i32
: 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[1] = temp_arg(arg_ts->mem_base);
--
2.17.1
- [Qemu-devel] [RFC v2 15/38] tcg: let plugins instrument memory accesses, (continued)
- [Qemu-devel] [RFC v2 15/38] tcg: let plugins instrument memory accesses, Emilio G. Cota, 2018/12/09
- [Qemu-devel] [RFC v2 24/38] target/sh4: fetch code with translator_ld (WIP), Emilio G. Cota, 2018/12/09
- [Qemu-devel] [RFC v2 21/38] translator: add translator_ld{ub, sw, uw, l, q}, Emilio G. Cota, 2018/12/09
- [Qemu-devel] [RFC v2 10/38] plugin-gen: add module for TCG-related code, Emilio G. Cota, 2018/12/09
- [Qemu-devel] [RFC v2 25/38] target/i386: fetch code with translator_ld, Emilio G. Cota, 2018/12/09
- [Qemu-devel] [RFC v2 38/38] tests/plugin: add sample plugins, Emilio G. Cota, 2018/12/09
- [Qemu-devel] [RFC v2 37/38] linux-user: support -plugin option, Emilio G. Cota, 2018/12/09
- [Qemu-devel] [RFC v2 27/38] target/m68k: fetch code with translator_ld, Emilio G. Cota, 2018/12/09
- [Qemu-devel] [RFC v2 29/38] target/riscv: fetch code with translator_ld, Emilio G. Cota, 2018/12/09
- [Qemu-devel] [RFC v2 22/38] target/arm: call qemu_plugin_insn_append, Emilio G. Cota, 2018/12/09
- [Qemu-devel] [RFC v2 08/38] tcg: drop nargs from tcg_op_insert_{before, after},
Emilio G. Cota <=
- [Qemu-devel] [RFC v2 19/38] cpu: hook plugin vcpu events, Emilio G. Cota, 2018/12/09
- [Qemu-devel] [RFC v2 20/38] plugin-gen: add plugin_insn_append, Emilio G. Cota, 2018/12/09
- [Qemu-devel] [RFC v2 35/38] configure: add --enable-plugins, Emilio G. Cota, 2018/12/09
- [Qemu-devel] [RFC v2 28/38] target/alpha: fetch code with translator_ld, Emilio G. Cota, 2018/12/09
- [Qemu-devel] [RFC v2 26/38] target/hppa: fetch code with translator_ld, Emilio G. Cota, 2018/12/09
- [Qemu-devel] [RFC v2 36/38] vl: support -plugin option, Emilio G. Cota, 2018/12/09
- [Qemu-devel] [RFC v2 34/38] plugin: add API symbols to qemu-plugins.symbols, Emilio G. Cota, 2018/12/09
- [Qemu-devel] [RFC v2 30/38] target/sparc: fetch code with translator_ld, Emilio G. Cota, 2018/12/09
- [Qemu-devel] [RFC v2 31/38] target/xtensa: fetch code with translator_ld, Emilio G. Cota, 2018/12/09