[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-arm] [PATCH v2 05/14] target/arm/helper: zcr: Add build bug ne
From: |
Richard Henderson |
Subject: |
Re: [Qemu-arm] [PATCH v2 05/14] target/arm/helper: zcr: Add build bug next to value range assumption |
Date: |
Wed, 26 Jun 2019 12:07:35 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.0 |
On 6/21/19 6:34 PM, Andrew Jones wrote:
> Suggested-by: Dave Martin <address@hidden>
> Signed-off-by: Andrew Jones <address@hidden>
> ---
> target/arm/helper.c | 1 +
> 1 file changed, 1 insertion(+)
Reviewed-by: Richard Henderson <address@hidden>
> diff --git a/target/arm/helper.c b/target/arm/helper.c
> index df4276f5f6ca..edba94004e0b 100644
> --- a/target/arm/helper.c
> +++ b/target/arm/helper.c
> @@ -5319,6 +5319,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);
>
Re down-thread conversation, I think this is the nice easy way to make sure
that the 0xf is modified if we ever decide to support larger vectors.
I *think* that we could write ARM_MAX_VQ - 1 here, but I'm pretty sure there
are a few other places where we assume that we only need 4 bits to store this
value. Anyway, we'd definitely need to audit the code to allow ARM_MAX_VQ to
change.
r~
- Re: [Qemu-arm] [PATCH v2 05/14] target/arm/helper: zcr: Add build bug next to value range assumption, (continued)
Re: [Qemu-arm] [PATCH v2 05/14] target/arm/helper: zcr: Add build bug next to value range assumption, Auger Eric, 2019/06/26
Re: [Qemu-arm] [PATCH v2 05/14] target/arm/helper: zcr: Add build bug next to value range assumption,
Richard Henderson <=
[Qemu-arm] [PATCH v2 06/14] target/arm: Allow SVE to be disabled via a CPU property, Andrew Jones, 2019/06/21
[Qemu-arm] [PATCH v2 08/14] target/arm/kvm64: Fix error returns, Andrew Jones, 2019/06/21