[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v3 5/5] target/arm: Add SVE state to TB->FLAGS
From: |
Peter Maydell |
Subject: |
Re: [Qemu-devel] [PATCH v3 5/5] target/arm: Add SVE state to TB->FLAGS |
Date: |
Mon, 29 Jan 2018 18:01:34 +0000 |
On 23 January 2018 at 03:53, Richard Henderson
<address@hidden> wrote:
> Add both SVE exception state and vector length.
>
> Signed-off-by: Richard Henderson <address@hidden>
> diff --git a/target/arm/translate-a64.c b/target/arm/translate-a64.c
> index 10eef870fe..4c1eca7062 100644
> --- a/target/arm/translate-a64.c
> +++ b/target/arm/translate-a64.c
> @@ -11263,6 +11263,8 @@ static int
> aarch64_tr_init_disas_context(DisasContextBase *dcbase,
> dc->user = (dc->current_el == 0);
> #endif
> dc->fp_excp_el = ARM_TBFLAG_FPEXC_EL(dc->base.tb->flags);
> + dc->sve_excp_el = ARM_TBFLAG_SVEEXC_EL(dc->base.tb->flags);
> + dc->sve_len = (ARM_TBFLAG_ZCR_LEN(dc->base.tb->flags) + 1) * 16;
You've carefully arranged that the sve_excp checks are a superset
of the fp_excp checks, which means that we get the correct
exception prioritization by always doing the sve_excp check first
and then the fp_excp check second, without having to look at
whether fp_excp_el or sve_excp_el is larger to see which should
take precedence. We could
assert(dc->sve_excp_el <= dc->fp_excp_el);
and perhaps have a comment noting why this is useful...
Otherwise
Reviewed-by: Peter Maydell <address@hidden>
thanks
-- PMM
- Re: [Qemu-devel] [PATCH v3 2/5] target/arm: Add predicate registers for SVE, (continued)