aboutsummaryrefslogtreecommitdiff
path: root/hmp.h
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2017-03-20 12:41:44 +0000
committerPeter Maydell <peter.maydell@linaro.org>2017-03-20 12:41:44 +0000
commitb28b3377d7e9ba35611d454d5a63ef50cab1f8c5 (patch)
tree5fa5e7f187a69de72eaea3ae70f209a18cf841d4 /hmp.h
parent3d54026fb06d1aea7ebb4e9825970b06bebcacac (diff)
arm: Fix APSR writes via M profile MSR
Our implementation of writes to the APSR for M-profile via the MSR instruction was badly broken. First and worst, we had the sense wrong on the test of bit 2 of the SYSm field -- this is supposed to request an APSR write if bit 2 is 0 but we were doing it if bit 2 was 1. This bug was introduced in commit 58117c9bb429cd, so hasn't been in a QEMU release. Secondly, the choice of exactly which parts of APSR should be written is defined by bits in the 'mask' field. We were not passing these through from instruction decode, making it impossible to check them in the helper. Pass the mask bits through from the instruction decode to the helper function and process them appropriately; fix the wrong sense of the SYSm bit 2 check. Invalid mask values and invalid combinations of mask and register number are UNPREDICTABLE; we choose to treat them as if the mask values were valid. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Message-id: 1487616072-9226-5-git-send-email-peter.maydell@linaro.org Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Diffstat (limited to 'hmp.h')
0 files changed, 0 insertions, 0 deletions