On 07/30/2018 12:12 PM, Aleksandar Markovic wrote: > diff --git a/target/mips/op_helper.c b/target/mips/op_helper.c > index c55a1e6..e6749c5 100644 > --- a/target/mips/op_helper.c > +++ b/target/mips/op_helper.c > @@ -2430,6 +2430,13 @@ static void set_pc(CPUMIPSState *env, target_ulong > error_pc) > env->active_tc.PC = error_pc & ~(target_ulong)1; > if (env->insn_flags & ISA_NANOMIPS32) { > /* Don't clear MIPS_HFLAG_M16 */ > + if (error_pc & 1) { > + if (!(env->hflags & MIPS_HFLAG_DM)) { > + env->CP0_BadVAddr = error_pc; > + } > + env->active_tc.PC = error_pc; > + do_raise_exception(env, EXCP_AdEL, 0); > + }
Isn't this taken care of by decode_nanomips_opc? What do you gain by checking twice? r~