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.mayd...@linaro.org>
Reviewed-by: Richard Henderson <richard.hender...@linaro.org> > + /* M-profile handled this earlier, in disas_m_profile_nocp() */ That's not the function name you settled upon. r~