target/arm: Unify checking for M Main Extension in MRS/MSR
authorDavid Reiss <dreiss@meta.com>
Mon, 9 Jan 2023 23:05:19 +0000 (15:05 -0800)
committerPeter Maydell <peter.maydell@linaro.org>
Mon, 23 Jan 2023 13:00:11 +0000 (13:00 +0000)
commit0ec69c460ef7a02596afbe4bd46c9fa954a5f992
treeae024c920a2ba69feb99d3cf8e4b5171b5ad65ae
parentbb461330a1ca4d90c67054b493ed408fb7852d74
target/arm: Unify checking for M Main Extension in MRS/MSR

BASEPRI, FAULTMASK, and their _NS equivalents only exist on devices with
the Main Extension.  However, the MRS instruction did not check this,
and the MSR instruction handled it inconsistently (warning BASEPRI, but
silently ignoring writes to BASEPRI_NS).  Unify this behavior and always
warn when reading or writing any of these registers if the extension is
not present.

Signed-off-by: David Reiss <dreiss@meta.com>
Message-id: 167330628518.10497.13100425787268927786-0@git.sr.ht
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
target/arm/m_helper.c