Skip to content

Commit

Permalink
target/arm: Correct VMOV_imm_dp handling of short vectors
Browse files Browse the repository at this point in the history
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().)

Fixes: 18cf951
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20190702105115.9465-1-peter.maydell@linaro.org
  • Loading branch information
pm215 committed Jul 4, 2019
1 parent 5529de1 commit 89a11ff
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion target/arm/translate-vfp.inc.c
Expand Up @@ -1971,7 +1971,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(fd);
Expand Down

0 comments on commit 89a11ff

Please sign in to comment.