mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2025-03-29 04:46:54 +00:00
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:
parent
928f226ed6
commit
5c153537f5
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue