Skip to content

Commit

Permalink
target/arm/helper: zcr: Add build bug next to value range assumption
Browse files Browse the repository at this point in the history
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 <Dave.Martin@arm.com>
Signed-off-by: Andrew Jones <drjones@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
  • Loading branch information
Andrew Jones authored and pm215 committed Aug 16, 2019
1 parent ae50250 commit 7b351d9
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions target/arm/helper.c
Expand Up @@ -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);

/*
Expand Down

0 comments on commit 7b351d9

Please sign in to comment.