[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 16/16] target/arm: Add SVE state to TB->FLAGS
From: |
Peter Maydell |
Subject: |
Re: [Qemu-devel] [PATCH v2 16/16] target/arm: Add SVE state to TB->FLAGS |
Date: |
Mon, 22 Jan 2018 14:40:03 +0000 |
On 19 January 2018 at 04:54, Richard Henderson
<address@hidden> wrote:
> Add both SVE exception state and vector length.
>
> Signed-off-by: Richard Henderson <address@hidden>
> @@ -11772,14 +11772,35 @@ void cpu_get_tb_cpu_state(CPUARMState *env,
> target_ulong *pc,
> target_ulong *cs_base, uint32_t *pflags)
> {
> ARMMMUIdx mmu_idx = core_to_arm_mmu_idx(env, cpu_mmu_index(env, false));
> + int fp_el = fp_exception_el(env);
> uint32_t flags;
>
> if (is_a64(env)) {
> + int sve_el = sve_exception_el(env);
> + uint32_t zcr_len;
> +
> *pc = env->pc;
> flags = ARM_TBFLAG_AARCH64_STATE_MASK;
> /* Get control bits for tagged addresses */
> flags |= (arm_regime_tbi0(env, mmu_idx) << ARM_TBFLAG_TBI0_SHIFT);
> flags |= (arm_regime_tbi1(env, mmu_idx) << ARM_TBFLAG_TBI1_SHIFT);
> + flags |= sve_el << ARM_TBFLAG_SVEEXC_EL_SHIFT;
> +
> + /* If SVE is disabled, but FP is enabled,
> + then the effective len is 0. */
> + if (sve_el != 0 && fp_el == 0) {
> + zcr_len = 0;
> + } else {
> + int highest_el = arm_highest_el(env);
> + int current_el = arm_current_el(env);
> + int i;
> +
> + zcr_len = 0xf & (uint32_t)env->vfp.zcr_el[highest_el];
> + for (i = highest_el - 1; i >= MAX(1, current_el); --i) {
> + zcr_len = MIN(zcr_len, 0xf & (uint32_t)env->vfp.zcr_el[i]);
> + }
This loop also doesn't consider the case of EL3 implemented but
EL2 not, I think.
thanks
-- PMM
- [Qemu-devel] [PATCH v2 06/16] target/arm: Add aa{32, 64}_vfp_{dreg, qreg} helpers, (continued)
- [Qemu-devel] [PATCH v2 06/16] target/arm: Add aa{32, 64}_vfp_{dreg, qreg} helpers, Richard Henderson, 2018/01/18
- [Qemu-devel] [PATCH v2 12/16] target/arm: Add ZCR_ELx, Richard Henderson, 2018/01/18
- [Qemu-devel] [PATCH v2 15/16] target/arm: Simplify fp_exception_el for user-only, Richard Henderson, 2018/01/18
- [Qemu-devel] [PATCH v2 14/16] target/arm: Hoist store to flags output in cpu_get_tb_cpu_state, Richard Henderson, 2018/01/18
- [Qemu-devel] [PATCH v2 16/16] target/arm: Add SVE state to TB->FLAGS, Richard Henderson, 2018/01/18
- Re: [Qemu-devel] [PATCH v2 16/16] target/arm: Add SVE state to TB->FLAGS,
Peter Maydell <=
- [Qemu-devel] [PATCH v2 13/16] target/arm: Move cpu_get_tb_cpu_state out of line, Richard Henderson, 2018/01/18
- Re: [Qemu-devel] [PATCH v2 00/16] target/arm: Prepatory work for SVE, no-reply, 2018/01/19
- Re: [Qemu-devel] [PATCH v2 00/16] target/arm: Prepatory work for SVE, Peter Maydell, 2018/01/22
- Re: [Qemu-devel] [PATCH v2 00/16] target/arm: Prepatory work for SVE, Alex Bennée, 2018/01/22