diff options
| author | Konstantin Belousov <kib@FreeBSD.org> | 2025-09-21 03:03:09 +0000 |
|---|---|---|
| committer | Konstantin Belousov <kib@FreeBSD.org> | 2025-09-21 03:04:58 +0000 |
| commit | 5c55b2f3ba6f48575496bde2d4d86272d10a8197 (patch) | |
| tree | 52fd146e3f941be4a67ebbcbccf9fad5c36e9638 | |
| parent | 4c3a868d13c053ef173268cdfe1365978a282178 (diff) | |
x86: directly use clflushopt mnemonic in cpufunc.h
We already use clflushopt in support.S, there is no reason to manually
construct the encoding. Initially it was done because toolchains did
not supported the (then) new instruction.
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
| -rw-r--r-- | sys/amd64/include/cpufunc.h | 2 | ||||
| -rw-r--r-- | sys/i386/include/cpufunc.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/sys/amd64/include/cpufunc.h b/sys/amd64/include/cpufunc.h index d180f5c76afb..e6c9f47ea261 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 diff --git a/sys/i386/include/cpufunc.h b/sys/i386/include/cpufunc.h index 4bed57b5afbf..b200588b0739 100644 --- a/sys/i386/include/cpufunc.h +++ b/sys/i386/include/cpufunc.h @@ -74,7 +74,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 |
