Re: [Qemu-devel] [PATCH for-3.1] target/arm: Remove can't-happen if() from handle_vec_simd_shli()

2018-10-31 Thread Alex Bennée
Peter Maydell writes: > In handle_vec_simd_shli() we have a check: > if (size > 3 && !is_q) { > unallocated_encoding(s); > return; > } > However this can never be true, because we calculate > int size = 32 - clz32(immh) - 1; > where immh is a 4 bit field which

Re: [Qemu-devel] [PATCH for-3.1] target/arm: Remove can't-happen if() from handle_vec_simd_shli()

2018-10-30 Thread Philippe Mathieu-Daudé
On 30/10/18 17:25, Peter Maydell wrote: In handle_vec_simd_shli() we have a check: if (size > 3 && !is_q) { unallocated_encoding(s); return; } However this can never be true, because we calculate int size = 32 - clz32(immh) - 1; where immh is a 4 bit field

[Qemu-devel] [PATCH for-3.1] target/arm: Remove can't-happen if() from handle_vec_simd_shli()

2018-10-30 Thread Peter Maydell
In handle_vec_simd_shli() we have a check: if (size > 3 && !is_q) { unallocated_encoding(s); return; } However this can never be true, because we calculate int size = 32 - clz32(immh) - 1; where immh is a 4 bit field which we know cannot be all-zeroes. So the