[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 5/7] target/arm: Do M-profile NOCP checks early and via decod
From: |
Richard Henderson |
Subject: |
Re: [PATCH 5/7] target/arm: Do M-profile NOCP checks early and via decodetree |
Date: |
Tue, 4 Aug 2020 20:04:24 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 |
On 8/3/20 4:18 AM, Peter Maydell wrote:
> For M-profile CPUs, the architecture specifies that the NOCP
> exception when a coprocessor is not present or disabled should cover
> the entire wide range of coprocessor-space encodings, and should take
> precedence over UNDEF exceptions. (This is the opposite of
> A-profile, where checking for a disabled FPU has to happen last.)
>
> Implement this with decodetree patterns that cover the specified
> ranges of the encoding space. There are a few instructions (VLLDM,
> VLSTM, and in v8.1 also VSCCLRM) which are in copro-space but must
> not be NOCP'd: these must be handled also in the new m-nocp.decode so
> they take precedence.
>
> This is a minor behaviour change: for unallocated insn patterns in
> the VFP area (cp=10,11) we will now NOCP rather than UNDEF when the
> FPU is disabled.
>
> As well as giving us the correct architectural behaviour for v8.1M
> and the recommended behaviour for v8.0M, this refactoring also
> removes the old NOCP handling from the remains of the 'legacy
> decoder' in disas_thumb2_insn(), paving the way for cleaning that up.
>
> Since we don't currently have a v8.1M feature bit or any v8.1M CPUs,
> the minor changes to this logic that we'll need for v8.1M are marked
> up with TODO comments.
>
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
> + /* M-profile handled this earlier, in disas_m_profile_nocp() */
That's not the function name you settled upon.
r~
- [PATCH 0/7] target/arm: copro decode cleanup, Peter Maydell, 2020/08/03
- [PATCH 1/7] target/arm: Pull handling of XScale insns out of disas_coproc_insn(), Peter Maydell, 2020/08/03
- [PATCH 2/7] target/arm: Separate decode from handling of coproc insns, Peter Maydell, 2020/08/03
- [PATCH 3/7] target/arm: Convert A32 coprocessor insns to decodetree, Peter Maydell, 2020/08/03
- [PATCH 4/7] target/arm: Tidy up disas_arm_insn(), Peter Maydell, 2020/08/03
- [PATCH 5/7] target/arm: Do M-profile NOCP checks early and via decodetree, Peter Maydell, 2020/08/03
- Re: [PATCH 5/7] target/arm: Do M-profile NOCP checks early and via decodetree,
Richard Henderson <=
- [PATCH 6/7] target/arm: Convert T32 coprocessor insns to decodetree, Peter Maydell, 2020/08/03
- [PATCH 7/7] target/arm: Remove ARCH macro, Peter Maydell, 2020/08/03