From a9d0e36bcfb0cc0152bdda3b628e861ea7e5558e Mon Sep 17 00:00:00 2001 From: Peter Maydell Date: Tue, 16 Jun 2020 23:25:46 -0400 Subject: [PATCH] target/arm: Fix missing temp frees in do_vshll_2sh The widenfn() in do_vshll_2sh() does not free the input 32-bit TCGv, so we need to do this in the calling code. Backports commit 9593a3988c3e788790aa107d778386b09f456a6d from qemu --- qemu/target/arm/translate-neon.inc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/qemu/target/arm/translate-neon.inc.c b/qemu/target/arm/translate-neon.inc.c index 4fd0c8bb..c9cfda89 100644 --- a/qemu/target/arm/translate-neon.inc.c +++ b/qemu/target/arm/translate-neon.inc.c @@ -1646,6 +1646,7 @@ static bool do_vshll_2sh(DisasContext *s, arg_2reg_shift *a, tmp = tcg_temp_new_i64(tcg_ctx); widenfn(tcg_ctx, tmp, rm0); + tcg_temp_free_i32(tcg_ctx, rm0); if (a->shift != 0) { tcg_gen_shli_i64(tcg_ctx, tmp, tmp, a->shift); tcg_gen_andi_i64(tcg_ctx, tmp, tmp, ~widen_mask); @@ -1653,6 +1654,7 @@ static bool do_vshll_2sh(DisasContext *s, arg_2reg_shift *a, neon_store_reg64(s, tmp, a->vd); widenfn(tcg_ctx, tmp, rm1); + tcg_temp_free_i32(tcg_ctx, rm1); if (a->shift != 0) { tcg_gen_shli_i64(tcg_ctx, tmp, tmp, a->shift); tcg_gen_andi_i64(tcg_ctx, tmp, tmp, ~widen_mask);