Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 28 Sep 2025 00:51:44 GMT
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: a3be514dbcd1 - stable/14 - x86: directly use clflushopt mnemonic in cpufunc.h
Message-ID:  <202509280051.58S0piEH064241@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/14 has been updated by kib:

URL: https://cgit.FreeBSD.org/src/commit/?id=a3be514dbcd1386d42887d10f49aaa3b085b7d7d

commit a3be514dbcd1386d42887d10f49aaa3b085b7d7d
Author:     Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2025-09-21 03:03:09 +0000
Commit:     Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2025-09-28 00:47:24 +0000

    x86: directly use clflushopt mnemonic in cpufunc.h
    
    (cherry picked from commit 5c55b2f3ba6f48575496bde2d4d86272d10a8197)
---
 sys/amd64/include/cpufunc.h | 2 +-
 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 ca53d73b0186..3a4a83821f1f 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202509280051.58S0piEH064241>