From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36099) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y9h2R-000706-63 for qemu-devel@nongnu.org; Fri, 09 Jan 2015 16:24:12 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y9h2P-0007Ed-7H for qemu-devel@nongnu.org; Fri, 09 Jan 2015 16:24:11 -0500 Received: from mail-qa0-x22b.google.com ([2607:f8b0:400d:c00::22b]:46161) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y9h2P-0007EZ-3s for qemu-devel@nongnu.org; Fri, 09 Jan 2015 16:24:09 -0500 Received: by mail-qa0-f43.google.com with SMTP id v10so3811479qac.2 for ; Fri, 09 Jan 2015 13:24:08 -0800 (PST) Sender: Richard Henderson From: Richard Henderson Date: Fri, 9 Jan 2015 13:23:18 -0800 Message-Id: <1420838600-22369-9-git-send-email-rth@twiddle.net> In-Reply-To: <1420838600-22369-1-git-send-email-rth@twiddle.net> References: <1420838600-22369-1-git-send-email-rth@twiddle.net> Subject: [Qemu-devel] [PULL 08/10] tcg: Remove unused opcodes List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org We no longer need INDEX_op_end to terminate the list, nor do we need 5 forms of nop, since we just remove the TCGOp instead. Reviewed-by: Bastian Koppelmann Signed-off-by: Richard Henderson --- tcg/tcg-opc.h | 9 --------- tcg/tcg.c | 7 ++----- tci.c | 13 ------------- 3 files changed, 2 insertions(+), 27 deletions(-) diff --git a/tcg/tcg-opc.h b/tcg/tcg-opc.h index 042d442..42d0cfe 100644 --- a/tcg/tcg-opc.h +++ b/tcg/tcg-opc.h @@ -27,15 +27,6 @@ */ /* predefined ops */ -DEF(end, 0, 0, 0, TCG_OPF_NOT_PRESENT) /* must be kept first */ -DEF(nop, 0, 0, 0, TCG_OPF_NOT_PRESENT) -DEF(nop1, 0, 0, 1, TCG_OPF_NOT_PRESENT) -DEF(nop2, 0, 0, 2, TCG_OPF_NOT_PRESENT) -DEF(nop3, 0, 0, 3, TCG_OPF_NOT_PRESENT) - -/* variable number of parameters */ -DEF(nopn, 0, 0, 1, TCG_OPF_NOT_PRESENT) - DEF(discard, 1, 0, 0, TCG_OPF_NOT_PRESENT) DEF(set_label, 0, 0, 1, TCG_OPF_BB_END | TCG_OPF_NOT_PRESENT) diff --git a/tcg/tcg.c b/tcg/tcg.c index 4115e8b..3841e99 100644 --- a/tcg/tcg.c +++ b/tcg/tcg.c @@ -1260,7 +1260,7 @@ void tcg_op_remove(TCGContext *s, TCGOp *op) s->gen_first_op_idx = next; } - *op = (TCGOp){ .opc = INDEX_op_nop, .next = -1, .prev = -1 }; + memset(op, -1, sizeof(*op)); #ifdef CONFIG_PROFILER s->del_op_count++; @@ -1385,8 +1385,6 @@ static void tcg_liveness_analysis(TCGContext *s) } break; case INDEX_op_debug_insn_start: - case INDEX_op_nop: - case INDEX_op_end: break; case INDEX_op_discard: /* mark the temporary as dead */ @@ -2244,7 +2242,7 @@ void tcg_dump_op_count(FILE *f, fprintf_function cpu_fprintf) { int i; - for(i = INDEX_op_end; i < NB_OPS; i++) { + for (i = 0; i < NB_OPS; i++) { cpu_fprintf(f, "%s %" PRId64 "\n", tcg_op_defs[i].name, tcg_table_op_count[i]); } @@ -2328,7 +2326,6 @@ static inline int tcg_gen_code_common(TCGContext *s, tcg_reg_alloc_movi(s, args, dead_args, sync_args); break; case INDEX_op_debug_insn_start: - case INDEX_op_nop: break; case INDEX_op_discard: temp_dead(s, args[0]); diff --git a/tci.c b/tci.c index 4711ee4..28292b3 100644 --- a/tci.c +++ b/tci.c @@ -506,19 +506,6 @@ uintptr_t tcg_qemu_tb_exec(CPUArchState *env, uint8_t *tb_ptr) tb_ptr += 2; switch (opc) { - case INDEX_op_end: - case INDEX_op_nop: - break; - case INDEX_op_nop1: - case INDEX_op_nop2: - case INDEX_op_nop3: - case INDEX_op_nopn: - case INDEX_op_discard: - TODO(); - break; - case INDEX_op_set_label: - TODO(); - break; case INDEX_op_call: t0 = tci_read_ri(&tb_ptr); #if TCG_TARGET_REG_BITS == 32 -- 2.1.0