diff options
Diffstat (limited to 'target/ppc/power8-pmu.c')
-rw-r--r-- | target/ppc/power8-pmu.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/target/ppc/power8-pmu.c b/target/ppc/power8-pmu.c index 5e689144d7..7131f52ccc 100644 --- a/target/ppc/power8-pmu.c +++ b/target/ppc/power8-pmu.c @@ -133,6 +133,20 @@ void helper_store_mmcr0(CPUPPCState *env, target_ulong value) hreg_compute_hflags(env); } +target_ulong helper_read_pmc(CPUPPCState *env, uint32_t sprn) +{ + pmu_update_cycles(env); + + return env->spr[sprn]; +} + +void helper_store_pmc(CPUPPCState *env, uint32_t sprn, uint64_t value) +{ + pmu_update_cycles(env); + + env->spr[sprn] = value; +} + static void fire_PMC_interrupt(PowerPCCPU *cpu) { CPUPPCState *env = &cpu->env; |