From f403c1f54f533fd769abd525d6a005713481e481 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Thu, 25 Feb 2021 23:25:47 -0500 Subject: [PATCH] target/arm: Fix mtedesc for do_mem_zpz The mtedesc that was constructed was not actually passed in. Found by Coverity (CID 1429996). Backports commit cdecb3fc1eb182d90666348a47afe63c493686e7 from qemu --- qemu/target/arm/translate-sve.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qemu/target/arm/translate-sve.c b/qemu/target/arm/translate-sve.c index 7d9e2d1e..10f71b57 100644 --- a/qemu/target/arm/translate-sve.c +++ b/qemu/target/arm/translate-sve.c @@ -5435,7 +5435,7 @@ static void do_mem_zpz(DisasContext *s, int zt, int pg, int zm, desc <<= SVE_MTEDESC_SHIFT; } desc = simd_desc(vsz, vsz, scale); - t_desc = tcg_const_i32(tcg_ctx, desc); + desc = simd_desc(vsz, vsz, desc | scale); tcg_gen_addi_ptr(tcg_ctx, t_pg, tcg_ctx->cpu_env, pred_full_reg_offset(s, pg)); tcg_gen_addi_ptr(tcg_ctx, t_zm, tcg_ctx->cpu_env, vec_full_reg_offset(s, zm));