[nasm:nasm-2.16.xx] x86: SMAP instructions are NP

nasm-bot for H. Peter Anvin hpa at zytor.com
Thu Dec 14 18:00:04 PST 2023


Commit-ID:  b4300ac280814a380d0f6d1043f7cf543dea5cd4
Gitweb:     http://repo.or.cz/w/nasm.git?a=commitdiff;h=b4300ac280814a380d0f6d1043f7cf543dea5cd4
Author:     H. Peter Anvin <hpa at zytor.com>
AuthorDate: Thu, 14 Dec 2023 17:57:27 -0800
Committer:  H. Peter Anvin <hpa at zytor.com>
CommitDate: Thu, 14 Dec 2023 17:57:27 -0800

x86: SMAP instructions are NP

The SMAP instructions are np; notably the prefixed versions of CLAC
are ERETU/ERETS.

Signed-off-by: H. Peter Anvin <hpa at zytor.com>


---
 x86/iflags.ph | 1 +
 x86/insns.dat | 6 +++---
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/x86/iflags.ph b/x86/iflags.ph
index ad92d9bd..ef2b1b4b 100644
--- a/x86/iflags.ph
+++ b/x86/iflags.ph
@@ -111,6 +111,7 @@ if_("AVXNECONVERT",	 "AVX exceptionless floating-point conversions");
 if_("AVXVNNIINT8",       "AVX Vector Neural Network 8-bit integer instructions");
 if_("AVXIFMA",           "AVX integer multiply and add");
 if_("HRESET",            "History reset");
+if_("SMAP",		 "Supervisor Mode Access Prevention (SMAP)");
 
 # Put these last to minimize their relevance
 if_("OBSOLETE",          "Instruction removed from architecture");
diff --git a/x86/insns.dat b/x86/insns.dat
index a0498d76..ca6c23f4 100644
--- a/x86/insns.dat
+++ b/x86/insns.dat
@@ -3039,9 +3039,9 @@ RDSEED		reg16				[m:	o16 0f c7 /7]				FUTURE
 RDSEED		reg32				[m:	o32 0f c7 /7]				FUTURE
 RDSEED		reg64				[m:	o64 0f c7 /7]				LONG,FUTURE
 
-; Per AVX spec revision 14, document 319433-014
-CLAC		void				[	0f 01 ca]				PRIV,FUTURE
-STAC		void				[	0f 01 cb]				PRIV,FUTURE
+;# Supervisor Mode Access Prevention (SMAP)
+CLAC		void				[	np 0f 01 ca]				SMAP,PRIV,FUTURE
+STAC		void				[	np 0f 01 cb]				SMAP,PRIV,FUTURE
 
 ;# VIA (Centaur) security instructions
 XSTORE		void				[	0f a7 c0]				PENT,CYRIX


More information about the Nasm-commits mailing list