summaryrefslogtreecommitdiff
path: root/target
diff options
context:
space:
mode:
authorAaron Lindsay OS <aaron@os.amperecomputing.com>2019-02-21 18:17:45 +0000
committerPeter Maydell <peter.maydell@linaro.org>2019-02-21 18:17:45 +0000
commit67da43d668320e1bcb0a0195aaf2de4ff2a001a0 (patch)
treed808371d315615bc57ba24de509eb205bcf6cfe5 /target
parentcff21316c666c8053b1f425577e324038d0ca30d (diff)
downloadqemu-67da43d668320e1bcb0a0195aaf2de4ff2a001a0.zip
target/arm: Stop unintentional sign extension in pmu_init
This was introduced by commit bf8d09694ccc07487cd73d7562081fdaec3370c8 target/arm: Don't clear supported PMU events when initializing PMCEID1 and identified by Coverity (CID 1398645). Signed-off-by: Aaron Lindsay <aaron@os.amperecomputing.com> Reported-by: Peter Maydell <peter.maydell@linaro.org> Message-id: 20190219144621.450-1-aaron@os.amperecomputing.com Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'target')
-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 fe054897c7..c2630fa1ea 100644
--- a/target/arm/helper.c
+++ b/target/arm/helper.c
@@ -1167,7 +1167,7 @@ void pmu_init(ARMCPU *cpu)
if (cnt->supported(&cpu->env)) {
supported_event_map[cnt->number] = i;
- uint64_t event_mask = 1 << (cnt->number & 0x1f);
+ uint64_t event_mask = 1ULL << (cnt->number & 0x1f);
if (cnt->number & 0x20) {
cpu->pmceid1 |= event_mask;
} else {