5 * Access to machine-specific registers (available on 586 and better only)
6 * Note: the rd* operations modify the parameters directly (without using
7 * pointer indirection), this allows gcc to optimize better
10 #define rdmsr(msr,val1,val2) \
11 __asm__ __volatile__("rdmsr" \
12 : "=a" (val1), "=d" (val2) \
15 #define wrmsr(msr,val1,val2) \
16 __asm__ __volatile__("wrmsr" \
18 : "c" (msr), "a" (val1), "d" (val2))
20 #define rdtsc(low,high) \
21 __asm__ __volatile__("rdtsc" : "=a" (low), "=d" (high))
24 __asm__ __volatile__ ("rdtsc" : "=a" (low) : : "edx")
26 #define rdtscll(val) \
27 __asm__ __volatile__ ("rdtsc" : "=A" (val))
29 #define rdpmc(counter,low,high) \
30 __asm__ __volatile__("rdpmc" \
31 : "=a" (low), "=d" (high) \
33 #endif /* CPU_P6_MSR_H */