diff options
author | Richard Henderson <richard.henderson@linaro.org> | 2023-02-25 11:19:48 -1000 |
---|---|---|
committer | Richard Henderson <richard.henderson@linaro.org> | 2023-03-13 07:03:34 -0700 |
commit | 3351889caa8ff6d9bba2042597d79b191d01d151 (patch) | |
tree | c8e1449ece3b73fc7308a99df5bafec67c7db64c /target/arm | |
parent | 8d1b02a6a18552e16df0d991e3a4cc0054c6b8f8 (diff) | |
download | qemu-3351889caa8ff6d9bba2042597d79b191d01d151.zip qemu-3351889caa8ff6d9bba2042597d79b191d01d151.tar.gz qemu-3351889caa8ff6d9bba2042597d79b191d01d151.tar.bz2 |
target/arm: Improve trans_BFCI
Reorg temporary usage so that we can use tcg_constant_i32.
tcg_gen_deposit_i32 already has a width == 32 special case,
so remove the check here.
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'target/arm')
-rw-r--r-- | target/arm/tcg/translate.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/target/arm/tcg/translate.c b/target/arm/tcg/translate.c index b70b628..2cb9368 100644 --- a/target/arm/tcg/translate.c +++ b/target/arm/tcg/translate.c @@ -7261,8 +7261,8 @@ static bool trans_UBFX(DisasContext *s, arg_UBFX *a) static bool trans_BFCI(DisasContext *s, arg_BFCI *a) { - TCGv_i32 tmp; int msb = a->msb, lsb = a->lsb; + TCGv_i32 t_in, t_rd; int width; if (!ENABLE_ARCH_6T2) { @@ -7277,16 +7277,14 @@ static bool trans_BFCI(DisasContext *s, arg_BFCI *a) width = msb + 1 - lsb; if (a->rn == 15) { /* BFC */ - tmp = tcg_const_i32(0); + t_in = tcg_constant_i32(0); } else { /* BFI */ - tmp = load_reg(s, a->rn); - } - if (width != 32) { - TCGv_i32 tmp2 = load_reg(s, a->rd); - tcg_gen_deposit_i32(tmp, tmp2, tmp, lsb, width); + t_in = load_reg(s, a->rn); } - store_reg(s, a->rd, tmp); + t_rd = load_reg(s, a->rd); + tcg_gen_deposit_i32(t_rd, t_rd, t_in, lsb, width); + store_reg(s, a->rd, t_rd); return true; } |