diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2014-02-26 17:19:58 +0000 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2014-02-26 17:19:58 +0000 |
commit | 775fda92a1b52c784cd51c095d67fcca7250e1e5 (patch) | |
tree | 165abfb6dd657006f832ab83a43cae588a08a16b /target-arm | |
parent | cba933b2257ef0ad241756a0ff86bc0acda685ca (diff) | |
download | qemu-775fda92a1b52c784cd51c095d67fcca7250e1e5.zip |
target-arm: Fix incorrect arithmetic constructing short-form PAR for ATS ops
Correct some obviously nonsensical bit manipulation spotted by Coverity
when constructing the short-form PAR value for ATS operations.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 1392659525-8335-1-git-send-email-peter.maydell@linaro.org
Diffstat (limited to 'target-arm')
-rw-r--r-- | target-arm/helper.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/target-arm/helper.c b/target-arm/helper.c index 1b111b6e85..c993581688 100644 --- a/target-arm/helper.c +++ b/target-arm/helper.c @@ -1031,8 +1031,8 @@ static void ats_write(CPUARMState *env, const ARMCPRegInfo *ri, uint64_t value) env->cp15.c7_par = phys_addr & 0xfffff000; } } else { - env->cp15.c7_par = ((ret & (10 << 1)) >> 5) | - ((ret & (12 << 1)) >> 6) | + env->cp15.c7_par = ((ret & (1 << 10)) >> 5) | + ((ret & (1 << 12)) >> 6) | ((ret & 0xf) << 1) | 1; } env->cp15.c7_par_hi = 0; |