On 07/30/2018 12:12 PM, Aleksandar Markovic wrote: > +/* Immediate Value Compact Branches */ > +static void gen_compute_imm_branch(DisasContext *ctx, uint32_t opc, > + int rt, int32_t imm, int32_t offset) > +{ > + TCGCond cond; > + int bcond_compute = 0; > + TCGv t0 = tcg_temp_new(); > + TCGv t1 = tcg_temp_new(); > + > + if (ctx->hflags & MIPS_HFLAG_BMASK) { > +#ifdef MIPS_DEBUG_DISAS > + LOG_DISAS("Branch in delay / forbidden slot at PC 0x" TARGET_FMT_lx > + "\n", ctx->base.pc_next); > +#endif > + generate_exception_end(ctx, EXCP_RI); > + goto out; > + }
What is this, > + ctx->hflags |= MIPS_HFLAG_FBNSLOT; and this (and several other occurrences), given that forbidden slots have been removed from the nanomips architecture? I think perhaps all of your branching code, utilizing the existing expanders, needs a re-think. r~