From bb8b3bc42b30f884e218d4c980a72208ed353f59 Mon Sep 17 00:00:00 2001 From: Andrew Jones <drjones@redhat.com> Date: Mon, 18 Nov 2019 20:14:32 -0500 Subject: [PATCH] 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. Backports commit 7b351d98709d3f77d6bb18562e1bf228862b0d57 from qemu --- qemu/target/arm/helper.c | 1 + 1 file changed, 1 insertion(+) diff --git a/qemu/target/arm/helper.c b/qemu/target/arm/helper.c index aa376e10..e75d4e55 100644 --- a/qemu/target/arm/helper.c +++ b/qemu/target/arm/helper.c @@ -5112,6 +5112,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); /*