Skip to content

Commit d2db0f7

Browse files
committed
target/mips: Use tcg_constant_tl() in gen_compute_compact_branch()
The offset is constant and read-only: move it to the constant pool. Signed-off-by: Philippe Mathieu-Daudé <[email protected]> Reviewed-by: Richard Henderson <[email protected]> Message-Id: <[email protected]>
1 parent 469a316 commit d2db0f7

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

target/mips/tcg/translate.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11857,13 +11857,11 @@ static void gen_compute_compact_branch(DisasContext *ctx, uint32_t opc,
1185711857
} else {
1185811858
/* OPC_JIC, OPC_JIALC */
1185911859
TCGv tbase = tcg_temp_new();
11860-
TCGv toffset = tcg_temp_new();
11860+
TCGv toffset = tcg_constant_tl(offset);
1186111861

1186211862
gen_load_gpr(tbase, rt);
11863-
tcg_gen_movi_tl(toffset, offset);
1186411863
gen_op_addr_add(ctx, btarget, tbase, toffset);
1186511864
tcg_temp_free(tbase);
11866-
tcg_temp_free(toffset);
1186711865
}
1186811866
break;
1186911867
default:

0 commit comments

Comments
 (0)