mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-14 10:09:48 +00:00
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.
This commit is contained in:
parent
4a771f59c2
commit
a983fdfe4c
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=94386
@ -92,6 +92,14 @@ disable_intr(void)
|
||||
__asm __volatile("cli" : : : "memory");
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
@ -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)
|
||||
{
|
||||
|
@ -92,6 +92,14 @@ disable_intr(void)
|
||||
__asm __volatile("cli" : : : "memory");
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
@ -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)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user