diff options
author | Federico G. Schwindt <fgsch@cvs.openbsd.org> | 2003-05-27 23:52:02 +0000 |
---|---|---|
committer | Federico G. Schwindt <fgsch@cvs.openbsd.org> | 2003-05-27 23:52:02 +0000 |
commit | 7a731a1fe6524c31ce7f6e8fecd60489379c6daf (patch) | |
tree | 00251abe7338d48a80bbc0279c93255f57a32969 /sys/arch/i386/include/pctr.h | |
parent | 70241e466fecebe64b70cf3856dcb01af8d7d01b (diff) |
change .byte for the correct opcodes now that gas can handle'em.
art@ toby@ ok.
Diffstat (limited to 'sys/arch/i386/include/pctr.h')
-rw-r--r-- | sys/arch/i386/include/pctr.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/arch/i386/include/pctr.h b/sys/arch/i386/include/pctr.h index 3e0b6cf428c..3deb3e47582 100644 --- a/sys/arch/i386/include/pctr.h +++ b/sys/arch/i386/include/pctr.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pctr.h,v 1.11 2001/06/05 05:05:38 pvalchev Exp $ */ +/* $OpenBSD: pctr.h,v 1.12 2003/05/27 23:52:01 fgsch Exp $ */ /* * Pentium performance counter driver for OpenBSD. @@ -56,7 +56,7 @@ struct pctrst { #define rdtsc() \ ({ \ pctrval v; \ - __asm __volatile (".byte 0xf, 0x31" : "=A" (v)); \ + __asm __volatile ("rdtsc" : "=A" (v)); \ v; \ }) @@ -64,7 +64,7 @@ struct pctrst { #define rdpmc(ctr) \ ({ \ pctrval v; \ - __asm __volatile (".byte 0xf, 0x33\n" \ + __asm __volatile ("rdpmc\n" \ "\tandl $0xff, %%edx" \ : "=A" (v) : "c" (ctr)); \ v; \ @@ -75,12 +75,12 @@ struct pctrst { #define rdmsr(msr) \ ({ \ pctrval v; \ - __asm __volatile (".byte 0xf, 0x32" : "=A" (v) : "c" (msr)); \ + __asm __volatile ("rdmsr" : "=A" (v) : "c" (msr)); \ v; \ }) #define wrmsr(msr, v) \ - __asm __volatile (".byte 0xf, 0x30" :: "A" ((u_quad_t) (v)), "c" (msr)); + __asm __volatile ("wrmsr" :: "A" ((u_quad_t) (v)), "c" (msr)); #endif /* _KERNEL */ #endif /* ! _I386_PCTR_H_ */ |