target/arm: Stop unintentional sign extension in pmu_init
This was introduced by
commit bf8d09694c
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>
This commit is contained in:
parent
cff21316c6
commit
67da43d668
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue