On 17/11/26 20:20, Richard Henderson wrote:
On 11/13/26 08:11, Philippe Mathieu-Daudé wrote:
/* compact branch */
case OPC_BGEC:
case OPC_BLTC:
- gen_load_gpr(t0, rs);
- gen_load_gpr(t1, rt);
- bcond_compute = 1;
- ctx->btarget = addr_add(ctx, ctx->base.pc_next + 4, offset);
- break;
I don't understand why you're discarding bcond_compute?
Restoring context:
diff --git a/target/mips/tcg/nanomips_translate.c.inc
b/target/mips/tcg/nanomips_translate.c.inc
index 25d57e75a0b0..524972b24a98 100644
--- a/target/mips/tcg/nanomips_translate.c.inc
+++ b/target/mips/tcg/nanomips_translate.c.inc
@@ -2419,18 +2419,8 @@ static void
gen_compute_compact_branch_nm(DisasContext *ctx, uint32_t opc,
/* compact branch */
case OPC_BGEC:
case OPC_BLTC:
- gen_load_gpr(t0, rs);
- gen_load_gpr(t1, rt);
- bcond_compute = 1;
- ctx->btarget = addr_add(ctx, ctx->base.pc_next + 4, offset);
- break;
// now fall thru ...
case OPC_BGEUC:
case OPC_BLTUC:
- if (rs == 0 || rs == rt) {
- /* OPC_BLEZALC, OPC_BGEZALC */
- /* OPC_BGTZALC, OPC_BLTZALC */
- tcg_gen_movi_tl(cpu_gpr[31], ctx->base.pc_next + 4);
- }
// ... here
gen_load_gpr(t0, rs);
gen_load_gpr(t1, rt);
bcond_compute = 1;
I'll amend to description for clarity:
The deleted BGEC/BLTC lines are duplicated verbatim by the BGEUC/BLTUC
block they now fall through into, so bcond_compute/btarget handling is
unchanged.