target/arm: Honour M-profile FP enable bits
commitd87513c0abcbcd856f8e1dee2f2d18903b2c3ea2
authorPeter Maydell <peter.maydell@linaro.org>
Mon, 29 Apr 2019 16:35:58 +0000 (29 17:35 +0100)
committerPeter Maydell <peter.maydell@linaro.org>
Mon, 29 Apr 2019 16:35:58 +0000 (29 17:35 +0100)
tree70102f3c689c04fcb82d6df409c228c0e64f9c95
parentef9aae2522c22c05df17dd898099dd5c3f20d688
target/arm: Honour M-profile FP enable bits

Like AArch64, M-profile floating point has no FPEXC enable
bit to gate floating point; so always set the VFPEN TB flag.

M-profile also has CPACR and NSACR similar to A-profile;
they behave slightly differently:
 * the CPACR is banked between Secure and Non-Secure
 * if the NSACR forces a trap then this is taken to
   the Secure state, not the Non-Secure state

Honour the CPACR and NSACR settings. The NSACR handling
requires us to borrow the exception.target_el field
(usually meaningless for M profile) to distinguish the
NOCP UsageFault taken to Secure state from the more
usual fault taken to the current security state.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20190416125744.27770-6-peter.maydell@linaro.org
target/arm/helper.c
target/arm/translate.c