For M-profile before v8.1M, the only valid register for VMSR/VMRS is
the FPSCR. We have a comment that states this, but the actual logic
to forbid accesses for any other register value is missing, so we
would end up with A-profile style behaviour. Add the missing check.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id:
20201119215617.29887-7-peter.maydell@linaro.org
* Accesses to R15 are UNPREDICTABLE; we choose to undef.
* (FPSCR -> r15 is a special case which writes to the PSR flags.)
*/
- if (a->rt == 15 && (!a->l || a->reg != ARM_VFP_FPSCR)) {
+ if (a->reg != ARM_VFP_FPSCR) {
+ return false;
+ }
+ if (a->rt == 15 && !a->l) {
return false;
}
}