target/arm: Fix calculation of LTP mask when LR is 0
commit3f4f1880c245453b75d4c09049845b19de9964bf
authorPeter Maydell <peter.maydell@linaro.org>
Fri, 13 Aug 2021 16:11:48 +0000 (13 17:11 +0100)
committerPeter Maydell <peter.maydell@linaro.org>
Wed, 25 Aug 2021 09:48:48 +0000 (25 10:48 +0100)
treeddbd59a43791d80d5e929ca9e40f4185c042a7e7
parentfdcf2269c4e0e4f5ca3a389290a71d7aa98bd5c7
target/arm: Fix calculation of LTP mask when LR is 0

In mve_element_mask(), we calculate a mask for tail predication which
should have a number of 1 bits based on the value of LR.  However,
our MAKE_64BIT_MASK() macro has undefined behaviour when passed a
zero length.  Special case this to give the all-zeroes mask we
require.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
target/arm/mve_helper.c