10 #if !defined __X86INTRIN_H
11 #error "Never use <rdpruintrin.h> directly; include <x86intrin.h> instead."
14 #ifndef __RDPRUINTRIN_H
15 #define __RDPRUINTRIN_H
18 #define __DEFAULT_FN_ATTRS \
19 __attribute__((__always_inline__, __nodebug__, __target__("rdpru")))
33 return __builtin_ia32_rdpru(reg_id);
36 #define __RDPRU_MPERF 0
37 #define __RDPRU_APERF 1
45 #define __mperf() __builtin_ia32_rdpru(__RDPRU_MPERF)
53 #define __aperf() __builtin_ia32_rdpru(__RDPRU_APERF)
55 #undef __DEFAULT_FN_ATTRS
static __inline__ unsigned long long __DEFAULT_FN_ATTRS __rdpru(int reg_id)
Reads the content of a processor register.
#define __DEFAULT_FN_ATTRS