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
This commit is contained in:
Peter Maydell 2020-06-16 23:25:46 -04:00 committed by Lioncash
parent 6053203c1c
commit a9d0e36bcf

View file

@ -1646,6 +1646,7 @@ static bool do_vshll_2sh(DisasContext *s, arg_2reg_shift *a,
tmp = tcg_temp_new_i64(tcg_ctx); tmp = tcg_temp_new_i64(tcg_ctx);
widenfn(tcg_ctx, tmp, rm0); widenfn(tcg_ctx, tmp, rm0);
tcg_temp_free_i32(tcg_ctx, rm0);
if (a->shift != 0) { if (a->shift != 0) {
tcg_gen_shli_i64(tcg_ctx, tmp, tmp, a->shift); tcg_gen_shli_i64(tcg_ctx, tmp, tmp, a->shift);
tcg_gen_andi_i64(tcg_ctx, tmp, tmp, ~widen_mask); 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); neon_store_reg64(s, tmp, a->vd);
widenfn(tcg_ctx, tmp, rm1); widenfn(tcg_ctx, tmp, rm1);
tcg_temp_free_i32(tcg_ctx, rm1);
if (a->shift != 0) { if (a->shift != 0) {
tcg_gen_shli_i64(tcg_ctx, tmp, tmp, a->shift); tcg_gen_shli_i64(tcg_ctx, tmp, tmp, a->shift);
tcg_gen_andi_i64(tcg_ctx, tmp, tmp, ~widen_mask); tcg_gen_andi_i64(tcg_ctx, tmp, tmp, ~widen_mask);