aboutsummaryrefslogtreecommitdiff
path: root/target/xtensa
diff options
context:
space:
mode:
authorRichard Henderson <richard.henderson@linaro.org>2023-02-26 13:19:46 -1000
committerRichard Henderson <richard.henderson@linaro.org>2023-03-05 13:47:13 -0800
commit885f21fe7dc85f88518f52fc03282e73e0bd19cd (patch)
tree570ea20b49dddb42b4e1d2fb1975ffba8caa4b76 /target/xtensa
parent9ae647664c902839ea6935f7372ce67d04e6897b (diff)
downloadqemu-885f21fe7dc85f88518f52fc03282e73e0bd19cd.zip
qemu-885f21fe7dc85f88518f52fc03282e73e0bd19cd.tar.gz
qemu-885f21fe7dc85f88518f52fc03282e73e0bd19cd.tar.bz2
target/xtensa: Use tcg_gen_subfi_i32 in translate_sll
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.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/target/xtensa/translate.c b/target/xtensa/translate.c
index 41b8408..2903c73 100644
--- a/target/xtensa/translate.c
+++ b/target/xtensa/translate.c
@@ -2324,8 +2324,8 @@ static void translate_sll(DisasContext *dc, const OpcodeArg arg[],
tcg_gen_shl_i32(arg[0].out, arg[1].in, dc->sar_m32);
} else {
TCGv_i64 v = tcg_temp_new_i64();
- TCGv_i32 s = tcg_const_i32(32);
- tcg_gen_sub_i32(s, s, cpu_SR[SAR]);
+ TCGv_i32 s = tcg_temp_new();
+ tcg_gen_subfi_i32(s, 32, cpu_SR[SAR]);
tcg_gen_andi_i32(s, s, 0x3f);
tcg_gen_extu_i32_i64(v, arg[1].in);
gen_shift_reg(shl, s);