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).

Backports commit 67da43d668320e1bcb0a0195aaf2de4ff2a001a0 from qemu
This commit is contained in:
Aaron Lindsay OS 2019-02-22 18:32:00 -05:00 committed by Lioncash
parent 928f226ed6
commit 5c153537f5
No known key found for this signature in database
GPG Key ID: 4E3C3CC1031BA9C7

View File

@ -980,7 +980,7 @@ void pmu_init(ARMCPU *cpu)
if (cnt->supported(&cpu->env)) {
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 {