From 1f4c3d6bcc728950e46e49eb5a1d144f1d09b27a Mon Sep 17 00:00:00 2001 From: Peter Maydell Date: Thu, 8 Aug 2019 18:08:53 -0400 Subject: [PATCH] target/arm: Correct VMOV_imm_dp handling of short vectors Coverity points out (CID 1402195) that the loop in trans_VMOV_imm_dp() that iterates over the destination registers in a short-vector VMOV accidentally throws away the returned updated register number from vfp_advance_dreg(). Add the missing assignment. (We got this correct in trans_VMOV_imm_sp().) Backports commit 89a11ff756410aecb87d2c774df6e45dbf4105c1 from qemu --- qemu/target/arm/translate-vfp.inc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qemu/target/arm/translate-vfp.inc.c b/qemu/target/arm/translate-vfp.inc.c index fffea452..dbe07283 100644 --- a/qemu/target/arm/translate-vfp.inc.c +++ b/qemu/target/arm/translate-vfp.inc.c @@ -1996,7 +1996,7 @@ static bool trans_VMOV_imm_dp(DisasContext *s, arg_VMOV_imm_dp *a) /* Set up the operands for the next iteration */ veclen--; - vfp_advance_dreg(vd, delta_d); + vd = vfp_advance_dreg(vd, delta_d); } tcg_temp_free_i64(tcg_ctx, fd);