mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2024-12-23 23:35:33 +00:00
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[]. Backports commit 3944d58db3fc5bf131345a21a44013bc13849a12 from qemu
This commit is contained in:
parent
d5234c8b3d
commit
fd4ce2cba0
|
@ -10694,6 +10694,9 @@ static void disas_simd_shift_imm(DisasContext *s, uint32_t insn)
|
|||
bool is_u = extract32(insn, 29, 1);
|
||||
bool is_q = extract32(insn, 30, 1);
|
||||
|
||||
/* data_proc_simd[] has sent immh == 0 to disas_simd_mod_imm. */
|
||||
assert(immh != 0);
|
||||
|
||||
switch (opcode) {
|
||||
case 0x08: /* SRI */
|
||||
if (!is_u) {
|
||||
|
|
Loading…
Reference in a new issue