[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 08/10] target/arm: Fix has_vfp/has_neon ID reg squashing for
From: |
Richard Henderson |
Subject: |
Re: [PATCH 08/10] target/arm: Fix has_vfp/has_neon ID reg squashing for M-profile |
Date: |
Tue, 13 Oct 2020 12:07:44 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 |
On 10/12/20 8:37 AM, Peter Maydell wrote:
> In arm_cpu_realizefn(), if the CPU has VFP or Neon disabled then we
> squash the ID register fields so that we don't advertise it to the
> guest. This code was written for A-profile and needs some tweaks to
> work correctly on M-profile:
>
> * A-profile only fields should not be zeroed on M-profile:
> - MVFR0.FPSHVEC,FPTRAP
> - MVFR1.SIMDLS,SIMDINT,SIMDSP,SIMDHP
> - MVFR2.SIMDMISC
> * M-profile only fields should be zeroed on M-profile:
> - MVFR1.FP16
>
> In particular, because MVFR1.SIMDHP on A-profile is the same field as
> MVFR1.FP16 on M-profile this code was incorrectly disabling FP16
> support on an M-profile CPU (where has_neon is always false). This
> isn't a visible bug yet because we don't have any M-profile CPUs with
> FP16 support, but the change is necessary before we introduce any.
>
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---
> target/arm/cpu.c | 29 ++++++++++++++++++-----------
> 1 file changed, 18 insertions(+), 11 deletions(-)
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
r~
- [PATCH 05/10] target/arm: Don't allow BLX imm for M-profile, (continued)
[PATCH 08/10] target/arm: Fix has_vfp/has_neon ID reg squashing for M-profile, Peter Maydell, 2020/10/12
- Re: [PATCH 08/10] target/arm: Fix has_vfp/has_neon ID reg squashing for M-profile,
Richard Henderson <=