summaryrefslogtreecommitdiffstats
path: root/target-arm/helper.c
diff options
context:
space:
mode:
authorStefan Weil2014-08-04 15:41:55 +0200
committerPeter Maydell2014-08-04 15:41:55 +0200
commitcdcf14057d780cdbb1f89f8c5fc11a1a9184b5b1 (patch)
treef01818e17029247279d4e162ce17aa311c261a5f /target-arm/helper.c
parenttarget-arm: Add FAR_EL2 and 3 (diff)
downloadqemu-cdcf14057d780cdbb1f89f8c5fc11a1a9184b5b1.tar.gz
qemu-cdcf14057d780cdbb1f89f8c5fc11a1a9184b5b1.tar.xz
qemu-cdcf14057d780cdbb1f89f8c5fc11a1a9184b5b1.zip
target-arm: Fix bit test in sp_el0_access
Static code analyzers complain about a dubious & operation used for a boolean value. The code does not test the PSTATE_SP bit as it should. Cc: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Stefan Weil <sw@weilnetz.de> Message-id: 1406359601-25583-1-git-send-email-sw@weilnetz.de Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'target-arm/helper.c')
-rw-r--r--target-arm/helper.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/target-arm/helper.c b/target-arm/helper.c
index a7f82f32fe..d709285505 100644
--- a/target-arm/helper.c
+++ b/target-arm/helper.c
@@ -1853,7 +1853,7 @@ static uint64_t aa64_dczid_read(CPUARMState *env, const ARMCPRegInfo *ri)
static CPAccessResult sp_el0_access(CPUARMState *env, const ARMCPRegInfo *ri)
{
- if (!env->pstate & PSTATE_SP) {
+ if (!(env->pstate & PSTATE_SP)) {
/* Access to SP_EL0 is undefined if it's being used as
* the stack pointer.
*/