2020-08-03 11:18:47 +00:00
|
|
|
# M-profile UserFault.NOCP exception handling
|
|
|
|
#
|
|
|
|
# Copyright (c) 2020 Linaro, Ltd
|
|
|
|
#
|
|
|
|
# This library is free software; you can redistribute it and/or
|
|
|
|
# modify it under the terms of the GNU Lesser General Public
|
|
|
|
# License as published by the Free Software Foundation; either
|
|
|
|
# version 2.1 of the License, or (at your option) any later version.
|
|
|
|
#
|
|
|
|
# This library is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
# Lesser General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU Lesser General Public
|
|
|
|
# License along with this library; if not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
|
|
|
#
|
|
|
|
# This file is processed by scripts/decodetree.py
|
|
|
|
#
|
|
|
|
# For M-profile, the architecture specifies that NOCP UsageFaults
|
|
|
|
# should take precedence over UNDEF faults over the whole wide
|
|
|
|
# range of coprocessor-space encodings, with the exception of
|
|
|
|
# VLLDM and VLSTM. (Compare v8.1M IsCPInstruction() pseudocode and
|
|
|
|
# v8M Arm ARM rule R_QLGM.) This isn't mandatory for v8.0M but we choose
|
|
|
|
# to behave the same as v8.1M.
|
|
|
|
# This decode is handled before any others (and in particular before
|
|
|
|
# decoding FP instructions which are in the coprocessor space).
|
|
|
|
# If the coprocessor is not present or disabled then we will generate
|
|
|
|
# the NOCP exception; otherwise we let the insn through to the main decode.
|
|
|
|
|
2020-11-19 21:55:53 +00:00
|
|
|
%vd_dp 22:1 12:4
|
|
|
|
%vd_sp 12:4 22:1
|
|
|
|
|
2020-10-19 15:12:53 +00:00
|
|
|
&nocp cp
|
|
|
|
|
2020-08-03 11:18:47 +00:00
|
|
|
{
|
|
|
|
# Special cases which do not take an early NOCP: VLLDM and VLSTM
|
2020-11-19 21:56:09 +00:00
|
|
|
VLLDM_VLSTM 1110 1100 001 l:1 rn:4 0000 1010 op:1 000 0000
|
2020-11-19 21:55:53 +00:00
|
|
|
# VSCCLRM (new in v8.1M) is similar:
|
|
|
|
VSCCLRM 1110 1100 1.01 1111 .... 1011 imm:7 0 vd=%vd_dp size=3
|
|
|
|
VSCCLRM 1110 1100 1.01 1111 .... 1010 imm:8 vd=%vd_sp size=2
|
2020-08-03 11:18:47 +00:00
|
|
|
|
2020-10-19 15:12:53 +00:00
|
|
|
NOCP 111- 1110 ---- ---- ---- cp:4 ---- ---- &nocp
|
|
|
|
NOCP 111- 110- ---- ---- ---- cp:4 ---- ---- &nocp
|
|
|
|
# From v8.1M onwards this range will also NOCP:
|
|
|
|
NOCP_8_1 111- 1111 ---- ---- ---- ---- ---- ---- &nocp cp=10
|
2020-08-03 11:18:47 +00:00
|
|
|
}
|