[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 26/28] target/riscv: Remove gen_system()
From: |
Bastian Koppelmann |
Subject: |
[Qemu-devel] [PATCH 26/28] target/riscv: Remove gen_system() |
Date: |
Fri, 12 Oct 2018 19:30:45 +0200 |
with all 16 bit insns moved to decodetree no path is falling back to
gen_system(), so we can remove it.
Signed-off-by: Bastian Koppelmann <address@hidden>
Signed-off-by: Peer Adelt <address@hidden>
---
target/riscv/translate.c | 32 --------------------------------
1 file changed, 32 deletions(-)
diff --git a/target/riscv/translate.c b/target/riscv/translate.c
index 5e24ec49a0..86ca885c7e 100644
--- a/target/riscv/translate.c
+++ b/target/riscv/translate.c
@@ -305,34 +305,6 @@ static void gen_set_rm(DisasContext *ctx, int rm)
tcg_temp_free_i32(t0);
}
-
-static void gen_system(CPURISCVState *env, DisasContext *ctx, uint32_t opc,
- int rd, int rs1, int csr)
-{
- tcg_gen_movi_tl(cpu_pc, ctx->base.pc_next);
-
- switch (opc) {
- case OPC_RISC_ECALL:
- switch (csr) {
- case 0x0: /* ECALL */
- /* always generates U-level ECALL, fixed in do_interrupt handler */
- generate_exception(ctx, RISCV_EXCP_U_ECALL);
- tcg_gen_exit_tb(NULL, 0); /* no chaining */
- ctx->base.is_jmp = DISAS_NORETURN;
- break;
- case 0x1: /* EBREAK */
- generate_exception(ctx, RISCV_EXCP_BREAKPOINT);
- tcg_gen_exit_tb(NULL, 0); /* no chaining */
- ctx->base.is_jmp = DISAS_NORETURN;
- break;
- default:
- gen_exception_illegal(ctx);
- break;
- }
- break;
- }
-}
-
#define EX_SH(amount) \
static int64_t ex_shift_##amount(int imm) \
{ \
@@ -455,10 +427,6 @@ static void decode_RV32_64G(CPURISCVState *env,
DisasContext *ctx)
rd = GET_RD(ctx->opcode);
switch (op) {
- case OPC_RISC_SYSTEM:
- gen_system(env, ctx, MASK_OP_SYSTEM(ctx->opcode), rd, rs1,
- (ctx->opcode & 0xFFF00000) >> 20);
- break;
default:
gen_exception_illegal(ctx);
break;
--
2.19.1
- [Qemu-devel] [PATCH 14/28] target/riscv: Convert RV priv insns to decodetree, (continued)
- [Qemu-devel] [PATCH 14/28] target/riscv: Convert RV priv insns to decodetree, Bastian Koppelmann, 2018/10/12
- [Qemu-devel] [PATCH 18/28] target/riscv: Remove gen_jalr(), Bastian Koppelmann, 2018/10/12
- [Qemu-devel] [PATCH 16/28] target/riscv: Convert quadrant 1 of RVXC insns to decodetree, Bastian Koppelmann, 2018/10/12
- [Qemu-devel] [PATCH 17/28] target/riscv: Convert quadrant 2 of RVXC insns to decodetree, Bastian Koppelmann, 2018/10/12
- [Qemu-devel] [PATCH 09/28] target/riscv: Convert RV64A insns to decodetree, Bastian Koppelmann, 2018/10/12
- [Qemu-devel] [PATCH 26/28] target/riscv: Remove gen_system(),
Bastian Koppelmann <=
- [Qemu-devel] [PATCH 15/28] target/riscv: Convert quadrant 0 of RVXC insns to decodetree, Bastian Koppelmann, 2018/10/12
- [Qemu-devel] [PATCH 24/28] target/riscv: Remove shift and slt insn manual decoding, Bastian Koppelmann, 2018/10/12
- [Qemu-devel] [PATCH 27/28] target/riscv: Remove decode_RV32_64G(), Bastian Koppelmann, 2018/10/12
- [Qemu-devel] [PATCH 21/28] target/riscv: Replace gen_store() with trans_store(), Bastian Koppelmann, 2018/10/12