summaryrefslogtreecommitdiffstats
path: root/freebsd/sys/i386/include/machine/cpufunc.h
diff options
context:
space:
mode:
Diffstat (limited to 'freebsd/sys/i386/include/machine/cpufunc.h')
-rw-r--r--freebsd/sys/i386/include/machine/cpufunc.h41
1 files changed, 8 insertions, 33 deletions
diff --git a/freebsd/sys/i386/include/machine/cpufunc.h b/freebsd/sys/i386/include/machine/cpufunc.h
index df283e73..923d28ea 100644
--- a/freebsd/sys/i386/include/machine/cpufunc.h
+++ b/freebsd/sys/i386/include/machine/cpufunc.h
@@ -10,7 +10,7 @@
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- * 4. Neither the name of the University nor the names of its contributors
+ * 3. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
@@ -160,6 +160,13 @@ mfence(void)
__asm __volatile("mfence" : : : "memory");
}
+static __inline void
+sfence(void)
+{
+
+ __asm __volatile("sfence" : : : "memory");
+}
+
#ifdef _KERNEL
#ifndef __rtems__
@@ -631,34 +638,6 @@ load_dr3(u_int dr3)
}
static __inline u_int
-rdr4(void)
-{
- u_int data;
- __asm __volatile("movl %%dr4,%0" : "=r" (data));
- return (data);
-}
-
-static __inline void
-load_dr4(u_int dr4)
-{
- __asm __volatile("movl %0,%%dr4" : : "r" (dr4));
-}
-
-static __inline u_int
-rdr5(void)
-{
- u_int data;
- __asm __volatile("movl %%dr5,%0" : "=r" (data));
- return (data);
-}
-
-static __inline void
-load_dr5(u_int dr5)
-{
- __asm __volatile("movl %0,%%dr5" : : "r" (dr5));
-}
-
-static __inline u_int
rdr6(void)
{
u_int data;
@@ -753,8 +732,6 @@ void load_dr0(u_int dr0);
void load_dr1(u_int dr1);
void load_dr2(u_int dr2);
void load_dr3(u_int dr3);
-void load_dr4(u_int dr4);
-void load_dr5(u_int dr5);
void load_dr6(u_int dr6);
void load_dr7(u_int dr7);
void load_fs(u_short sel);
@@ -776,8 +753,6 @@ u_int rdr0(void);
u_int rdr1(void);
u_int rdr2(void);
u_int rdr3(void);
-u_int rdr4(void);
-u_int rdr5(void);
u_int rdr6(void);
u_int rdr7(void);
uint64_t rdtsc(void);