clang 19.0.0git
Macros | Functions
rdpruintrin.h File Reference

Go to the source code of this file.

Macros

#define __DEFAULT_FN_ATTRS    __attribute__((__always_inline__, __nodebug__, __target__("rdpru")))
 
#define __RDPRU_MPERF   0
 
#define __RDPRU_APERF   1
 
#define __mperf()   __builtin_ia32_rdpru(__RDPRU_MPERF)
 Reads the content of processor register MPERF.
 
#define __aperf()   __builtin_ia32_rdpru(__RDPRU_APERF)
 Reads the content of processor register APERF.
 

Functions

static __inline__ unsigned long long __DEFAULT_FN_ATTRS __rdpru (int reg_id)
 Reads the content of a processor register.
 

Macro Definition Documentation

◆ __aperf

#define __aperf ( )    __builtin_ia32_rdpru(__RDPRU_APERF)

Reads the content of processor register APERF.

This intrinsic generates instruction RDPRU to read the value of register APERF.

Definition at line 53 of file rdpruintrin.h.

◆ __DEFAULT_FN_ATTRS

#define __DEFAULT_FN_ATTRS    __attribute__((__always_inline__, __nodebug__, __target__("rdpru")))

Definition at line 18 of file rdpruintrin.h.

◆ __mperf

#define __mperf ( )    __builtin_ia32_rdpru(__RDPRU_MPERF)

Reads the content of processor register MPERF.

This intrinsic generates instruction RDPRU to read the value of register MPERF.

Definition at line 45 of file rdpruintrin.h.

◆ __RDPRU_APERF

#define __RDPRU_APERF   1

Definition at line 37 of file rdpruintrin.h.

◆ __RDPRU_MPERF

#define __RDPRU_MPERF   0

Definition at line 36 of file rdpruintrin.h.

Function Documentation

◆ __rdpru()

static __inline__ unsigned long long __DEFAULT_FN_ATTRS __rdpru ( int  reg_id)
static

Reads the content of a processor register.

This intrinsic corresponds to the RDPRU instruction.

Parameters
reg_idA processor register identifier.

Definition at line 31 of file rdpruintrin.h.