summaryrefslogtreecommitdiffstats
path: root/llvm/include/pmu/ppc/ppc-events.h
blob: f48e10d896e0a617596c2c91be81bf20cc079f8a (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
/*
 *  (C) 2018 by Computer System Laboratory, IIS, Academia Sinica, Taiwan.
 *      See COPYRIGHT in top-level directory.
 */

#ifndef __PPC_EVENTS_H
#define __PPC_EVENTS_H

#include <vector>
#include "pmu/pmu.h"

namespace pmu {

class PMUEvent;

#if defined(_ARCH_PPC) || defined(_ARCH_PPC64)
#define pmu_mb()     __asm__ __volatile__ ("sync" : : : "memory")
#define pmu_rmb()    __asm__ __volatile__ ("sync" : : : "memory")
#define pmu_wmb()    __asm__ __volatile__ ("sync" : : : "memory")
#endif 

int PPCInit(void);

} /* namespace pmu */

#endif /* __PPC_EVENTS_H */

/*
 * vim: ts=8 sts=4 sw=4 expandtab
 */
OpenPOWER on IntegriCloud