[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v3 16/23] target/mips: Extract trap code into env->error_code
From: |
Philippe Mathieu-Daudé |
Subject: |
Re: [PATCH v3 16/23] target/mips: Extract trap code into env->error_code |
Date: |
Wed, 3 Nov 2021 16:21:52 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.2.0 |
On 11/3/21 15:08, Richard Henderson wrote:
> Simplify cpu_loop by doing all of the decode in translate.
>
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
> linux-user/mips/cpu_loop.c | 41 +----------------------
> target/mips/tcg/translate.c | 24 ++++++++++---
> target/mips/tcg/micromips_translate.c.inc | 4 +--
> target/mips/tcg/nanomips_translate.c.inc | 4 +--
> 4 files changed, 25 insertions(+), 48 deletions(-)
> diff --git a/target/mips/tcg/micromips_translate.c.inc
> b/target/mips/tcg/micromips_translate.c.inc
> index f91f7a96cd..7e7d26a91b 100644
> --- a/target/mips/tcg/micromips_translate.c.inc
> +++ b/target/mips/tcg/micromips_translate.c.inc
> @@ -1047,7 +1047,7 @@ static void gen_pool32axf(CPUMIPSState *env,
> DisasContext *ctx, int rt, int rs)
> case TNE:
> mips32_op = OPC_TNE;
> do_trap:
> - gen_trap(ctx, mips32_op, rs, rt, -1);
> + gen_trap(ctx, mips32_op, rs, rt, -1, extract32(ctx->opcode, 12, 4));
> break;
> #ifndef CONFIG_USER_ONLY
> case MFC0:
> @@ -2439,7 +2439,7 @@ static void decode_micromips32_opc(CPUMIPSState *env,
> DisasContext *ctx)
> check_insn_opc_removed(ctx, ISA_MIPS_R6);
> mips32_op = OPC_TEQI;
> do_trapi:
> - gen_trap(ctx, mips32_op, rs, -1, imm);
> + gen_trap(ctx, mips32_op, rs, -1, imm, 0);
IIUC the microMIPS manual (MD00594):
gen_trap(ctx, mips32_op, rs, -1, imm,
extract32(ctx->opcode, 12, 4));
> break;
- [PATCH v3 10/23] linux-user/m68k: Use force_sig_fault, (continued)
- [PATCH v3 10/23] linux-user/m68k: Use force_sig_fault, Richard Henderson, 2021/11/03
- [PATCH v3 11/23] linux-user/microblaze: Use force_sig_fault, Richard Henderson, 2021/11/03
- [PATCH v3 12/23] linux-user/microblaze: Fix SIGFPE si_codes, Richard Henderson, 2021/11/03
- [PATCH v3 14/23] linux-user/mips: Use force_sig_fault, Richard Henderson, 2021/11/03
- [PATCH v3 13/23] linux-user/mips: Improve do_break, Richard Henderson, 2021/11/03
- [PATCH v3 15/23] target/mips: Extract break code into env->error_code, Richard Henderson, 2021/11/03
- [PATCH v3 16/23] target/mips: Extract trap code into env->error_code, Richard Henderson, 2021/11/03
- Re: [PATCH v3 16/23] target/mips: Extract trap code into env->error_code,
Philippe Mathieu-Daudé <=
[PATCH v3 20/23] linux-user/s390x: Use force_sig_fault, Richard Henderson, 2021/11/03
[PATCH v3 17/23] linux-user/openrisc: Use force_sig_fault, Richard Henderson, 2021/11/03
[PATCH v3 18/23] linux-user/ppc: Use force_sig_fault, Richard Henderson, 2021/11/03
[PATCH v3 21/23] linux-user/sh4: Use force_sig_fault, Richard Henderson, 2021/11/03
[PATCH v3 19/23] linux-user/riscv: Use force_sig_fault, Richard Henderson, 2021/11/03
[PATCH v3 23/23] linux-user/xtensa: Use force_sig_fault, Richard Henderson, 2021/11/03
[PATCH v3 22/23] linux-user/sparc: Use force_sig_fault, Richard Henderson, 2021/11/03