[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v3 22/40] target/mips: Add handling of branch de
From: |
Richard Henderson |
Subject: |
Re: [Qemu-devel] [PATCH v3 22/40] target/mips: Add handling of branch delay slots for nanoMIPS |
Date: |
Sat, 21 Jul 2018 11:03:12 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 |
On 07/19/2018 05:54 AM, Stefan Markovic wrote:
> @@ -10991,7 +10992,8 @@ static void gen_branch(DisasContext *ctx, int
> insn_bytes)
> break;
> case MIPS_HFLAG_BR:
> /* unconditional branch to register */
> - if (ctx->insn_flags & (ASE_MIPS16 | ASE_MICROMIPS)) {
> + if (ctx->has_isa_mode &&
> + (ctx->insn_flags & (ASE_MIPS16 | ASE_MICROMIPS))) {
Is this second condition really ever true for ISA_NANOMIPS?
> @@ -24747,6 +24749,7 @@ static void
> mips_tr_init_disas_context(DisasContextBase *dcbase, CPUState *cs)
> ctx->mrp = (env->CP0_Config5 >> CP0C5_MRP) & 1;
> ctx->nan2008 = (env->active_fpu.fcr31 >> FCR31_NAN2008) & 1;
> ctx->abs2008 = (env->active_fpu.fcr31 >> FCR31_ABS2008) & 1;
> + ctx->has_isa_mode = ((env->CP0_Config3 >> CP0C3_MMAR) & 0x7) != 3;
< 3?
Or perhaps merge the combined test here,
ctx->has_isa_mode = (ctx->insn_flags & (ASE_MIPS16 | ASE_MICROMIPS))
&& ((env->CP0_Config3 >> CP0C3_MMAR) & 0x7) < 3);
and only use ctx->has_isa_mode in the other locations.
r~
- [Qemu-devel] [PATCH v3 30/40] target/mips: Adjust set_pc() for nanoMIPS, (continued)
- [Qemu-devel] [PATCH v3 30/40] target/mips: Adjust set_pc() for nanoMIPS, Stefan Markovic, 2018/07/19
- [Qemu-devel] [PATCH v3 16/40] target/mips: Implement emulation of nanoMIPS ROTX instruction, Stefan Markovic, 2018/07/19
- [Qemu-devel] [PATCH v3 13/40] target/mips: Add emulation of misc nanoMIPS instructions (pool32a0), Stefan Markovic, 2018/07/19
- [Qemu-devel] [PATCH v3 05/40] target/mips: Add nanoMIPS decoding and extraction utilities, Stefan Markovic, 2018/07/19
- [Qemu-devel] [PATCH v3 22/40] target/mips: Add handling of branch delay slots for nanoMIPS, Stefan Markovic, 2018/07/19
- Re: [Qemu-devel] [PATCH v3 22/40] target/mips: Add handling of branch delay slots for nanoMIPS,
Richard Henderson <=
- [Qemu-devel] [PATCH v3 08/40] target/mips: Add emulation of nanoMIPS 16-bit logic instructions, Stefan Markovic, 2018/07/19
- [Qemu-devel] [PATCH v3 04/40] target/mips: Add decode_nanomips_opc() function, Stefan Markovic, 2018/07/19
- [Qemu-devel] [PATCH v3 09/40] target/mips: Add emulation of nanoMIPS 16-bit save and restore instructions, Stefan Markovic, 2018/07/19
- [Qemu-devel] [PATCH v3 21/40] target/mips: Implement DSP ASE support for nanoMIPS, Stefan Markovic, 2018/07/19
- [Qemu-devel] [PATCH v3 28/40] target/mips: Adjust exception_resume_pc() for nanoMIPS, Stefan Markovic, 2018/07/19