]> git.ipfire.org Git - thirdparty/qemu.git/commit
target/arm: Assert immh != 0 in disas_simd_shift_imm
authorRichard Henderson <richard.henderson@linaro.org>
Mon, 23 Mar 2020 17:22:30 +0000 (17:22 +0000)
committerPeter Maydell <peter.maydell@linaro.org>
Mon, 23 Mar 2020 17:22:30 +0000 (17:22 +0000)
commit3944d58db3fc5bf131345a21a44013bc13849a12
treef63e7dc4ce9237786862b9da78e2dcb9e9cd3331
parentae1111d4def40c6f592c3a307c599272b778eb65
target/arm: Assert immh != 0 in disas_simd_shift_imm

Coverity raised a shed-load of errors cascading from inferring
that clz32(immh) might yield 32, from immh might be 0.

While immh cannot be 0 from encoding, it is not obvious even to
a human how we've checked that: via the filtering provided by
data_proc_simd[].

Reported-by: Coverity (CID 1421923, and more)
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-id: 20200320160622.8040-3-richard.henderson@linaro.org
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
target/arm/translate-a64.c