aboutsummaryrefslogtreecommitdiff
path: root/sys/amd64/include/cpufunc.h
diff options
context:
space:
mode:
Diffstat (limited to 'sys/amd64/include/cpufunc.h')
-rw-r--r--sys/amd64/include/cpufunc.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/sys/amd64/include/cpufunc.h b/sys/amd64/include/cpufunc.h
index d180f5c76afb..9a4c82275a99 100644
--- a/sys/amd64/include/cpufunc.h
+++ b/sys/amd64/include/cpufunc.h
@@ -76,7 +76,7 @@ static __inline void
clflushopt(u_long addr)
{
- __asm __volatile(".byte 0x66;clflush %0" : : "m" (*(char *)addr));
+ __asm __volatile("clflushopt %0" : : "m" (*(char *)addr));
}
static __inline void
@@ -572,6 +572,15 @@ rss(void)
return (sel);
}
+static __inline u_short
+rcs(void)
+{
+ u_short sel;
+
+ __asm __volatile("movw %%cs,%0" : "=rm" (sel));
+ return (sel);
+}
+
static __inline void
load_ds(u_short sel)
{