diff options
author | dwmalone <dwmalone@FreeBSD.org> | 2002-04-10 21:18:46 +0000 |
---|---|---|
committer | dwmalone <dwmalone@FreeBSD.org> | 2002-04-10 21:18:46 +0000 |
commit | a1416e3bd8eee43466ad8865c8586c5c9e333f99 (patch) | |
tree | e27f39f1094d4a3637ea4d2aabdbaabcb1ce454e /sys/i386 | |
parent | 882d743c7308355116615280a25be307a6f44eaa (diff) | |
download | FreeBSD-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/i386')
-rw-r--r-- | sys/i386/include/cpufunc.h | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/sys/i386/include/cpufunc.h b/sys/i386/include/cpufunc.h index d57839a..a77fda1 100644 --- a/sys/i386/include/cpufunc.h +++ b/sys/i386/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) { |