summaryrefslogtreecommitdiff
path: root/libs/dolphin/src/base/PPCPm.c
blob: b892839645637fc20144b76e6a6a0d16a956f53b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#include <dolphin/dolphin.h>
#include <dolphin/base/PPCArch.h>

void PMBegin(void) {
    PPCMtmmcr0(0);
    PPCMtmmcr1(0);
    PPCMtpmc1(0);
    PPCMtpmc2(0);
    PPCMtpmc3(0);
    PPCMtpmc4(0);
    PPCMtmmcr0(0x4F);
    PPCMtmmcr1(0x78800000);
}

void PMEnd(void) {
    PPCMtmmcr0(0);
    PPCMtmmcr1(0);
}

void PMCycles(void) {
    PPCMfpmc1();
}

void PML1FetchMisses(void) {
    PPCMfpmc2();
}

void PML1MissCycles(void) {
    PPCMfpmc3();
}

void PMInstructions(void) {
    PPCMfpmc4();
}