summaryrefslogtreecommitdiffstats
path: root/sys/amd64/include/cpufunc.h
diff options
context:
space:
mode:
authordwmalone <dwmalone@FreeBSD.org>2002-04-10 21:18:46 +0000
committerdwmalone <dwmalone@FreeBSD.org>2002-04-10 21:18:46 +0000
commita1416e3bd8eee43466ad8865c8586c5c9e333f99 (patch)
treee27f39f1094d4a3637ea4d2aabdbaabcb1ce454e /sys/amd64/include/cpufunc.h
parent882d743c7308355116615280a25be307a6f44eaa (diff)
downloadFreeBSD-src-a1416e3bd8eee43466ad8865c8586c5c9e333f99.zip
FreeBSD-src-a1416e3bd8eee43466ad8865c8586c5c9e333f99.tar.gz
Move do_cpuid into the correct place in this file and make
the indentation more like the other multi-line assembley in this file. Someone who understands gcc constraints could update the constraints for do_cpuid.
Diffstat (limited to 'sys/amd64/include/cpufunc.h')
-rw-r--r--sys/amd64/include/cpufunc.h18
1 files changed, 8 insertions, 10 deletions
diff --git a/sys/amd64/include/cpufunc.h b/sys/amd64/include/cpufunc.h
index d57839a..a77fda1 100644
--- a/sys/amd64/include/cpufunc.h
+++ b/sys/amd64/include/cpufunc.h
@@ -93,6 +93,14 @@ disable_intr(void)
}
static __inline void
+do_cpuid(u_int ax, u_int *p)
+{
+ __asm __volatile("cpuid"
+ : "=a" (p[0]), "=b" (p[1]), "=c" (p[2]), "=d" (p[3])
+ : "0" (ax));
+}
+
+static __inline void
enable_intr(void)
{
__asm __volatile("sti");
@@ -367,16 +375,6 @@ read_eflags(void)
return (ef);
}
-static __inline void
-do_cpuid(u_int ax, u_int *p)
-{
- __asm __volatile(
- "cpuid"
- : "=a" (p[0]), "=b" (p[1]), "=c" (p[2]), "=d" (p[3])
- : "0" (ax)
- );
-}
-
static __inline u_int64_t
rdmsr(u_int msr)
{
OpenPOWER on IntegriCloud