target/arm: Adjust and validate mtedesc sizem1
commitb12a7671b6099a26ce5d5ab09701f151e21c112c
authorRichard Henderson <richard.henderson@linaro.org>
Thu, 15 Feb 2024 11:30:44 +0000 (15 11:30 +0000)
committerPeter Maydell <peter.maydell@linaro.org>
Thu, 15 Feb 2024 11:30:44 +0000 (15 11:30 +0000)
tree6f07766092f2bc950a81e09a451b003d63f264ad
parent64c6e7444dff64b42d11b836b9aec9acfbe8ecc2
target/arm: Adjust and validate mtedesc sizem1

When we added SVE_MTEDESC_SHIFT, we effectively limited the
maximum size of MTEDESC.  Adjust SIZEM1 to consume the remaining
bits (32 - 10 - 5 - 12 == 5).  Assert that the data to be stored
fits within the field (expecting 8 * 4 - 1 == 31, exact fit).

Cc: qemu-stable@nongnu.org
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Tested-by: Gustavo Romero <gustavo.romero@linaro.org>
Message-id: 20240207025210.8837-4-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
target/arm/internals.h
target/arm/tcg/translate-sve.c