aboutsummaryrefslogtreecommitdiff
path: root/target/arm
diff options
context:
space:
mode:
authorRichard Henderson <richard.henderson@linaro.org>2022-04-26 09:30:07 -0700
committerPeter Maydell <peter.maydell@linaro.org>2022-04-28 13:35:58 +0100
commit2e9917194d0711b19f276c2e9091503c7beb11e2 (patch)
tree4299aa26f711e64220287460d16d89d83a3332b7 /target/arm
parent182320a7a5de19c3e1a1d76c8f5d4ac1849c6c71 (diff)
downloadqemu-2e9917194d0711b19f276c2e9091503c7beb11e2.zip
qemu-2e9917194d0711b19f276c2e9091503c7beb11e2.tar.gz
qemu-2e9917194d0711b19f276c2e9091503c7beb11e2.tar.bz2
target/arm: Use tcg_constant in disas_add_sum_imm*
Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Message-id: 20220426163043.100432-12-richard.henderson@linaro.org Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'target/arm')
-rw-r--r--target/arm/translate-a64.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/target/arm/translate-a64.c b/target/arm/translate-a64.c
index 4cdc869..6c88772 100644
--- a/target/arm/translate-a64.c
+++ b/target/arm/translate-a64.c
@@ -4178,13 +4178,12 @@ static void disas_add_sub_imm(DisasContext *s, uint32_t insn)
tcg_gen_addi_i64(tcg_result, tcg_rn, imm);
}
} else {
- TCGv_i64 tcg_imm = tcg_const_i64(imm);
+ TCGv_i64 tcg_imm = tcg_constant_i64(imm);
if (sub_op) {
gen_sub_CC(is_64bit, tcg_result, tcg_rn, tcg_imm);
} else {
gen_add_CC(is_64bit, tcg_result, tcg_rn, tcg_imm);
}
- tcg_temp_free_i64(tcg_imm);
}
if (is_64bit) {
@@ -4232,12 +4231,9 @@ static void disas_add_sub_imm_with_tags(DisasContext *s, uint32_t insn)
tcg_rd = cpu_reg_sp(s, rd);
if (s->ata) {
- TCGv_i32 offset = tcg_const_i32(imm);
- TCGv_i32 tag_offset = tcg_const_i32(uimm4);
-
- gen_helper_addsubg(tcg_rd, cpu_env, tcg_rn, offset, tag_offset);
- tcg_temp_free_i32(tag_offset);
- tcg_temp_free_i32(offset);
+ gen_helper_addsubg(tcg_rd, cpu_env, tcg_rn,
+ tcg_constant_i32(imm),
+ tcg_constant_i32(uimm4));
} else {
tcg_gen_addi_i64(tcg_rd, tcg_rn, imm);
gen_address_with_allocation_tag0(tcg_rd, tcg_rd);