diff options
author | Richard Henderson <richard.henderson@linaro.org> | 2023-02-26 13:19:01 -1000 |
---|---|---|
committer | Richard Henderson <richard.henderson@linaro.org> | 2023-03-05 13:47:07 -0800 |
commit | 9ae647664c902839ea6935f7372ce67d04e6897b (patch) | |
tree | 6e92ff6f772aaeeec385653e4dae910395ef6f40 /target/xtensa | |
parent | bc0264752d1ddc4f1a4b034a38883d3bbb03f2af (diff) |
target/xtensa: Avoid tcg_const_i32 in translate_l32r
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>
Diffstat (limited to 'target/xtensa')
-rw-r--r-- | target/xtensa/translate.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/target/xtensa/translate.c b/target/xtensa/translate.c index d727f9ffd8..41b84082de 100644 --- a/target/xtensa/translate.c +++ b/target/xtensa/translate.c @@ -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); } |