From: Andrew Jones Date: Fri, 2 Aug 2019 12:25:30 +0000 (+0200) Subject: target/arm/helper: zcr: Add build bug next to value range assumption X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=7b351d98709d3f77d6bb18562e1bf228862b0d57;p=qemu.git target/arm/helper: zcr: Add build bug next to value range assumption The current implementation of ZCR_ELx matches the architecture, only implementing the lower four bits, with the rest RAZ/WI. This puts a strict limit on ARM_MAX_VQ of 16. Make sure we don't let ARM_MAX_VQ grow without a corresponding update here. Suggested-by: Dave Martin Signed-off-by: Andrew Jones Reviewed-by: Richard Henderson Reviewed-by: Eric Auger Signed-off-by: Peter Maydell --- diff --git a/target/arm/helper.c b/target/arm/helper.c index 24806c16ca..2fd504ea7a 100644 --- a/target/arm/helper.c +++ b/target/arm/helper.c @@ -5300,6 +5300,7 @@ static void zcr_write(CPUARMState *env, const ARMCPRegInfo *ri, int new_len; /* Bits other than [3:0] are RAZ/WI. */ + QEMU_BUILD_BUG_ON(ARM_MAX_VQ > 16); raw_write(env, ri, value & 0xf); /*