]> git.ipfire.org Git - thirdparty/qemu.git/commit
target/arm: Rearrange disabled check for watchpoints
authorRichard Henderson <richard.henderson@linaro.org>
Mon, 23 Mar 2020 17:22:30 +0000 (17:22 +0000)
committerPeter Maydell <peter.maydell@linaro.org>
Mon, 23 Mar 2020 17:22:30 +0000 (17:22 +0000)
commitae1111d4def40c6f592c3a307c599272b778eb65
treebd47a6ea68c5544cbb1c5f0260c374bda6cbcf62
parent4dabf39592e92d692c6f2a1633571114ae25d843
target/arm: Rearrange disabled check for watchpoints

Coverity rightly notes that ctz32(bas) on 0 will return 32,
which makes the len calculation a BAD_SHIFT.

A value of 0 in DBGWCR<n>_EL1.BAS is reserved.  Simply move
the existing check we have for this case.

Reported-by: Coverity (CID 1421964)
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-id: 20200320160622.8040-2-richard.henderson@linaro.org
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
target/arm/helper.c