summaryrefslogtreecommitdiff
path: root/sys/arch/amd64/include/pctr.h
diff options
context:
space:
mode:
authorPhilip Guenther <guenther@cvs.openbsd.org>2014-03-29 18:09:32 +0000
committerPhilip Guenther <guenther@cvs.openbsd.org>2014-03-29 18:09:32 +0000
commit400e99c46f5fa56531015ba74096c3df72851d35 (patch)
tree0faef85a6b863396e8ea71feee002ee3a2782234 /sys/arch/amd64/include/pctr.h
parent3756224bec69e72815aea2adefb844c05c376b26 (diff)
It's been a quarter century: we can assume volatile is present with that name.
ok dlg@ mpi@ deraadt@
Diffstat (limited to 'sys/arch/amd64/include/pctr.h')
-rw-r--r--sys/arch/amd64/include/pctr.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/arch/amd64/include/pctr.h b/sys/arch/amd64/include/pctr.h
index bcaef0814ec..65defd7d32d 100644
--- a/sys/arch/amd64/include/pctr.h
+++ b/sys/arch/amd64/include/pctr.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: pctr.h,v 1.4 2011/03/23 16:54:34 pirofti Exp $ */
+/* $OpenBSD: pctr.h,v 1.5 2014/03/29 18:09:28 guenther Exp $ */
/*
* Pentium performance counter driver for OpenBSD.
@@ -54,14 +54,14 @@ struct pctrst {
#define rdtsc() \
({ \
u_int32_t hi, lo; \
- __asm __volatile("rdtsc" : "=d" (hi), "=a" (lo)); \
+ __asm volatile("rdtsc" : "=d" (hi), "=a" (lo)); \
((u_int64_t)hi << 32) | (u_int64_t)lo; \
})
#define rdpmc(pmc) \
({ \
u_int32_t hi, lo; \
- __asm __volatile("rdpmc" \
+ __asm volatile("rdpmc" \
: "=d" (hi), "=a" (lo) : "c" (pmc)); \
hi &= 0xffffff; \
(((u_int64_t)hi << 32) | (u_int64_t)lo); \
@@ -72,14 +72,14 @@ struct pctrst {
#define rdmsr(msr) \
({ \
u_int32_t hi, lo; \
- __asm __volatile("rdmsr" \
+ __asm volatile("rdmsr" \
: "=d" (hi), "=a" (lo) : "c" (msr)); \
((u_int64_t)hi << 32) | (u_int64_t) lo; \
})
#define wrmsr(msr, v) \
({ \
- __asm __volatile("wrmsr" : \
+ __asm volatile("wrmsr" : \
: "a" ((u_int64_t)v & 0xffffffff), \
"d" ((u_int64_t)v >> 32), "c" (msr)); \
})