[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v2 12/14] target-arm: Fix bit test in sp_el0_access
From: |
Eric Blake |
Subject: |
[Qemu-devel] [PATCH v2 12/14] target-arm: Fix bit test in sp_el0_access |
Date: |
Tue, 5 Aug 2014 16:41:12 -0600 |
From: Stefan Weil <address@hidden>
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 <address@hidden>
Signed-off-by: Stefan Weil <address@hidden>
Message-id: address@hidden
Signed-off-by: Peter Maydell <address@hidden>
---
target-arm/helper.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/target-arm/helper.c b/target-arm/helper.c
index a7f82f3..d709285 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.
*/
--
1.9.3
- [Qemu-devel] [PATCH v2 06/14] qapi: require valid expressions, (continued)
- [Qemu-devel] [PATCH v2 06/14] qapi: require valid expressions, Eric Blake, 2014/08/05
- [Qemu-devel] [PATCH v2 02/14] qapi: ignore files created during make check, Eric Blake, 2014/08/05
- [Qemu-devel] [PATCH v2 09/14] qapi: add check_type helper function, Eric Blake, 2014/08/05
- [Qemu-devel] [PATCH v2 10/14] qapi: merge UserDefTwo and UserDefNested in tests, Eric Blake, 2014/08/05
- [Qemu-devel] [PATCH v2 07/14] qapi: add some type check tests, Eric Blake, 2014/08/05
- [Qemu-devel] [PATCH v2 05/14] qapi: add some expr tests, Eric Blake, 2014/08/05
- [Qemu-devel] [PATCH v2 11/14] target-arm: Add FAR_EL2 and 3, Eric Blake, 2014/08/05
- [Qemu-devel] [PATCH v2 12/14] target-arm: Fix bit test in sp_el0_access,
Eric Blake <=
- [Qemu-devel] [PATCH v2 13/14] target-arm: don't hardcode mask values in arm_cpu_handle_mmu_fault, Eric Blake, 2014/08/05
- [Qemu-devel] [PATCH v2 14/14] target-arm: A64: fix TLB flush instructions, Eric Blake, 2014/08/05
- Re: [Qemu-devel] [PATCH v2 00/14] drop qapi nested structs, Eric Blake, 2014/08/05