Skip to content

Commit

Permalink
target/xtensa: Avoid tcg_const_i32 in translate_l32r
Browse files Browse the repository at this point in the history
Use addi on the addition side and tcg_constant_i32 on the other.

Reviewed-by: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
  • Loading branch information
rth7680 committed Mar 5, 2023
1 parent bc02647 commit 9ae6476
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions target/xtensa/translate.c
Original file line number Diff line number Diff line change
Expand Up @@ -1721,10 +1721,10 @@ static void translate_l32r(DisasContext *dc, const OpcodeArg arg[],
TCGv_i32 tmp;

if (dc->base.tb->flags & XTENSA_TBFLAG_LITBASE) {
tmp = tcg_const_i32(arg[1].raw_imm - 1);
tcg_gen_add_i32(tmp, cpu_SR[LITBASE], tmp);
tmp = tcg_temp_new();
tcg_gen_addi_i32(tmp, cpu_SR[LITBASE], arg[1].raw_imm - 1);
} else {
tmp = tcg_const_i32(arg[1].imm);
tmp = tcg_constant_i32(arg[1].imm);
}
tcg_gen_qemu_ld32u(arg[0].out, tmp, dc->cring);
}
Expand Down

0 comments on commit 9ae6476

Please sign in to comment.