Received: from eggs.gnu.org ([209.51.188.92]:59453) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gtwtB-0001lS-Ba for qemu-devel@nongnu.org; Wed, 13 Feb 2019 10:55:58 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gtwt9-0002Yi-CU for qemu-devel@nongnu.org; Wed, 13 Feb 2019 10:55:57 -0500 Received: from mail-pf1-x443.google.com ([2607:f8b0:4864:20::443]:43193) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gtwt7-000214-Tg for qemu-devel@nongnu.org; Wed, 13 Feb 2019 10:55:55 -0500 Received: by mail-pf1-x443.google.com with SMTP id q17so1312865pfh.10 for ; Wed, 13 Feb 2019 07:55:26 -0800 (PST) Date: Wed, 13 Feb 2019 07:54:09 -0800 Message-Id: <20190213155414.22285-31-palmer@sifive.com> In-Reply-To: <20190213155414.22285-1-palmer@sifive.com> References: <20190213155414.22285-1-palmer@sifive.com> From: Palmer Dabbelt Subject: [Qemu-devel] [PATCH v7 30/35] target/riscv: Remove decode_RV32_64G() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-riscv@nongnu.org Cc: qemu-devel@nongnu.org, Bastian Koppelmann , Peer Adelt From: Bastian Koppelmann decodetree handles all instructions now so the fallback is not necessary anymore. Reviewed-by: Richard Henderson Signed-off-by: Bastian Koppelmann Signed-off-by: Peer Adelt --- target/riscv/translate.c | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) diff --git a/target/riscv/translate.c b/target/riscv/translate.c index 65bedc966497..59c297915158 100644 --- a/target/riscv/translate.c +++ b/target/riscv/translate.c @@ -646,24 +646,6 @@ bool decode_insn16(DisasContext *ctx, uint16_t insn); #include "decode_insn16.inc.c" #include "insn_trans/trans_rvc.inc.c" -static void decode_RV32_64G(DisasContext *ctx) -{ - uint32_t op; - - /* We do not do misaligned address check here: the address should never be - * misaligned at this point. Instructions that set PC must do the check, - * since epc must be the address of the instruction that caused us to - * perform the misaligned instruction fetch */ - - op = MASK_OP_MAJOR(ctx->opcode); - - switch (op) { - default: - gen_exception_illegal(ctx); - break; - } -} - static void decode_opc(DisasContext *ctx) { /* check for compressed insn */ @@ -680,8 +662,7 @@ static void decode_opc(DisasContext *ctx) } else { ctx->pc_succ_insn = ctx->base.pc_next + 4; if (!decode_insn32(ctx, ctx->opcode)) { - /* fallback to old decoder */ - decode_RV32_64G(ctx); + gen_exception_illegal(ctx); } } } -- 2.18.1