[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [RFC PATCH 04/11] target/mips: Avoid access to CPUMIPSState
From: |
Philippe Mathieu-Daudé |
Subject: |
[Qemu-devel] [RFC PATCH 04/11] target/mips: Avoid access to CPUMIPSState from decode* functions |
Date: |
Mon, 12 Nov 2018 00:36:15 +0100 |
The DisasContext is already initialized from the CPUMIPSState in
mips_tr_init_disas_context().
Suggested-by: Richard Henderson <address@hidden>
Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
---
target/mips/translate.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/target/mips/translate.c b/target/mips/translate.c
index f5e8d0b4d2..e726f3ec00 100644
--- a/target/mips/translate.c
+++ b/target/mips/translate.c
@@ -16534,7 +16534,7 @@ static void decode_micromips32_opc(CPUMIPSState *env,
DisasContext *ctx)
check_insn(ctx, ASE_MIPS3D);
/* Fall through */
do_cp1branch:
- if (env->CP0_Config1 & (1 << CP0C1_FP)) {
+ if (ctx->CP0_Config1 & (1 << CP0C1_FP)) {
check_cp1_enabled(ctx);
gen_compute_branch1(ctx, mips32_op,
(ctx->opcode >> 18) & 0x7, imm << 1);
@@ -23809,7 +23809,7 @@ static void decode_opc_special_legacy(CPUMIPSState
*env, DisasContext *ctx)
break;
case OPC_MOVCI:
check_insn(ctx, ISA_MIPS4 | ISA_MIPS32);
- if (env->CP0_Config1 & (1 << CP0C1_FP)) {
+ if (ctx->CP0_Config1 & (1 << CP0C1_FP)) {
check_cp1_enabled(ctx);
gen_movci(ctx, rd, rs, (ctx->opcode >> 18) & 0x7,
(ctx->opcode >> 16) & 1);
--
2.17.2
- Re: [Qemu-devel] [RFC PATCH 05/11] decodetree: Force Python to print unsigned values, (continued)
- [Qemu-devel] [RFC PATCH 11/11] target/mips: Port MIPS64 DCL[Z/O] to decodetree, Philippe Mathieu-Daudé, 2018/11/11
- [Qemu-devel] [RFC PATCH 07/11] scripts/decodetree: Add add_func_check(), Philippe Mathieu-Daudé, 2018/11/11
- [Qemu-devel] [RFC PATCH 03/11] target/mips: Move the !ISA_MIPS32R6 check out of decode_opc_special2_legacy, Philippe Mathieu-Daudé, 2018/11/11
- [Qemu-devel] [RFC PATCH 01/11] MAINTAINERS: Add scripts/decodetree.py to the TCG section, Philippe Mathieu-Daudé, 2018/11/11
- [Qemu-devel] [RFC PATCH 04/11] target/mips: Avoid access to CPUMIPSState from decode* functions,
Philippe Mathieu-Daudé <=
- [Qemu-devel] [RFC PATCH 06/11] scripts/decodetree: Allow empty specifications, Philippe Mathieu-Daudé, 2018/11/11
- [Qemu-devel] [RFC PATCH 09/11] target/mips: Port SYNCI to decodetree, Philippe Mathieu-Daudé, 2018/11/11
- [Qemu-devel] [RFC PATCH 10/11] scripts/decodetree: Add add_cond_check(), Philippe Mathieu-Daudé, 2018/11/11
- [Qemu-devel] [RFC PATCH 02/11] decodetree: Add multiple include guard, Philippe Mathieu-Daudé, 2018/11/11
- [Qemu-devel] [RFC PATCH 08/11] target/mips: Add a decodetree stub, Philippe Mathieu-Daudé, 2018/11/11