From 57c375305cf14265bb5ef468bef25cf465a4382a Mon Sep 17 00:00:00 2001 From: "H. Peter Anvin (Intel)" Date: Sat, 27 Jun 2020 16:04:38 -0700 Subject: Makefile: add warnings.src to perlreq; longer list of binary files Add warnings.src to PERLREQ. If this isn't done, warnings.src ends up in the xdoc tarball rather than the release tarball, which means that unless the user can "make warnings" manually (which requires Perl) then they can't build the documentation. As this only affects the documentation build, it probably does not warrant a point release. Add a few more extensions to the list of recognized binary extensions for the purpose of generating a .zip file with DOS line ending conventions. Signed-off-by: H. Peter Anvin (Intel) --- Makefile.in | 5 +++-- Mkfiles/msvc.mak | 2 +- Mkfiles/openwcom.mak | 2 +- tools/release | 2 +- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/Makefile.in b/Makefile.in index dd4bf09f..8c8e1d54 100644 --- a/Makefile.in +++ b/Makefile.in @@ -184,7 +184,7 @@ PERLREQ = x86/insnsb.c x86/insnsa.c x86/insnsd.c x86/insnsi.h x86/insnsn.c \ x86/iflag.c x86/iflaggen.h \ macros/macros.c \ asm/pptok.ph asm/directbl.c asm/directiv.h \ - asm/warnings.c include/warnings.h \ + asm/warnings.c include/warnings.h doc/warnings.src \ version.h version.mac version.mak nsis/version.nsh INSDEP = x86/insns.dat x86/insns.pl x86/insns-iflags.ph x86/iflags.ph @@ -393,7 +393,8 @@ clean: distclean: clean $(RM_F) config.log config.status config/config.h for d in . $(SUBDIRS) $(XSUBDIRS); do \ - $(RM_F) "$$d"/*~ "$$d"/*.bak "$$d"/*.lst "$$d"/*.bin ; \ + $(RM_F) "$$d"/.\# "$$d"/\# "$$d"/*~ "$$d"/*.bak \ + "$$d"/*.lst "$$d"/*.bin ; \ done $(RM_F) test/*.$(O) $(RM_RF) autom4te*.cache diff --git a/Mkfiles/msvc.mak b/Mkfiles/msvc.mak index f004e984..d0272b2b 100644 --- a/Mkfiles/msvc.mak +++ b/Mkfiles/msvc.mak @@ -143,7 +143,7 @@ PERLREQ = x86\insnsb.c x86\insnsa.c x86\insnsd.c x86\insnsi.h x86\insnsn.c \ x86\iflag.c x86\iflaggen.h \ macros\macros.c \ asm\pptok.ph asm\directbl.c asm\directiv.h \ - asm\warnings.c include\warnings.h \ + asm\warnings.c include\warnings.h doc\warnings.src \ version.h version.mac version.mak nsis\version.nsh INSDEP = x86\insns.dat x86\insns.pl x86\insns-iflags.ph x86\iflags.ph diff --git a/Mkfiles/openwcom.mak b/Mkfiles/openwcom.mak index 82ce05ac..73e0d1bc 100644 --- a/Mkfiles/openwcom.mak +++ b/Mkfiles/openwcom.mak @@ -156,7 +156,7 @@ PERLREQ = x86\insnsb.c x86\insnsa.c x86\insnsd.c x86\insnsi.h x86\insnsn.c & x86\iflag.c x86\iflaggen.h & macros\macros.c & asm\pptok.ph asm\directbl.c asm\directiv.h & - asm\warnings.c include\warnings.h & + asm\warnings.c include\warnings.h doc\warnings.src & version.h version.mac version.mak nsis\version.nsh INSDEP = x86\insns.dat x86\insns.pl x86\insns-iflags.ph x86\iflags.ph diff --git a/tools/release b/tools/release index 16e35811..f353425a 100755 --- a/tools/release +++ b/tools/release @@ -66,7 +66,7 @@ mv nasm-"$version".tar.gz nasm-"$version".tar.bz2 nasm-"$version".tar.xz .. # Create zipfile (DOS convention: no prefix, convert file endings) cd nasm-"$version" -binext='jpg zip ico png pdf bin o obj exe com' +binext='jpg zip ico png pdf bin o obj exe com a lib xz' for e in $binext; do xbin="$xbin -x *.$e -x *.$e.t" ibin="$ibin -i *.$e -i *.$e.t" -- cgit v1.2.1 From bca6b26a7ec580f2d99deb3d8c0254f98c09c0a9 Mon Sep 17 00:00:00 2001 From: Henrik Gramner Date: Tue, 16 Jun 2020 01:07:19 +0200 Subject: insns.dat: Add Intel Control-Flow Enforcement Technology (CET) instructions Add instructions for Intel Control Flow Enforcement Technology (CET). Signed-off-by: Henrik Gramner Signed-off-by: H. Peter Anvin (Intel) --- x86/iflags.ph | 1 + x86/insns.dat | 16 ++++++++++++++++ 2 files changed, 17 insertions(+) diff --git a/x86/iflags.ph b/x86/iflags.ph index 8f0a80fd..2c05b293 100644 --- a/x86/iflags.ph +++ b/x86/iflags.ph @@ -83,6 +83,7 @@ if_("AVX512VPOPCNTDQ", "AVX-512 VPOPCNTD/VPOPCNTQ"); if_("AVX5124FMAPS", "AVX-512 4-iteration multiply-add"); if_("AVX5124VNNIW", "AVX-512 4-iteration dot product"); if_("SGX", "Intel Software Guard Extensions (SGX)"); +if_("CET", "Intel Control-Flow Enforcement Technology (CET)"); # Put these last [hpa: why?] if_("OBSOLETE", "Instruction removed from architecture"); diff --git a/x86/insns.dat b/x86/insns.dat index a59c5306..980c5943 100644 --- a/x86/insns.dat +++ b/x86/insns.dat @@ -5983,6 +5983,22 @@ ENCLS void [ np 0f 01 cf] SGX,FUTURE ENCLU void [ np 0f 01 d7] SGX,FUTURE ENCLV void [ np 0f 01 c0] SGX,FUTURE +;# Intel Control-Flow Enforcement Technology (CET) +CLRSSBSY mem64 [m: f3 0f ae /6] CET,FUTURE +ENDBR32 void [ f3 0f 1e fb] CET,FUTURE +ENDBR64 void [ f3 0f 1e fa] CET,FUTURE +INCSSPD reg32 [m: o32 f3 0f ae /5] CET,FUTURE +INCSSPQ reg64 [m: o64 f3 0f ae /5] CET,FUTURE,X64 +RDSSPD reg32 [m: o32 f3 0f 1e /1] CET,FUTURE +RDSSPQ reg64 [m: o64 f3 0f 1e /1] CET,FUTURE,X64 +RSTORSSP mem64 [m: f3 0f 01 /5] CET,FUTURE +SAVEPREVSSP void [ f3 0f 01 ea] CET,FUTURE +SETSSBSY void [ f3 0f 01 e8] CET,FUTURE +WRUSSD mem,reg32 [mr: o32 66 0f 38 f5 /r] CET,FUTURE +WRUSSQ mem,reg64 [mr: o64 66 0f 38 f5 /r] CET,FUTURE,X64 +WRSSD mem,reg32 [mr: o32 0f 38 f6 /r] CET,FUTURE +WRSSQ mem,reg64 [mr: o64 0f 38 f6 /r] CET,FUTURE,X64 + ;# Systematic names for the hinting nop instructions ; These should be last in the file HINT_NOP0 rm16 [m: o16 0f 18 /0] P6,UNDOC -- cgit v1.2.1 From aa542870ae02cea9b2654ab770dd33a442adb0f7 Mon Sep 17 00:00:00 2001 From: "H. Peter Anvin (Intel)" Date: Sat, 27 Jun 2020 16:14:50 -0700 Subject: changes.src: update for 2.15.01 Signed-off-by: H. Peter Anvin (Intel) --- doc/changes.src | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/doc/changes.src b/doc/changes.src index c1e7451a..29f190d4 100644 --- a/doc/changes.src +++ b/doc/changes.src @@ -7,6 +7,15 @@ The NASM 2 series supports x86-64, and is the production version of NASM since 2007. +\S{cl-2.15.01} Version 2.15.01 + +\b Fix building the documentation from the release archive. For 2.15, +the user has to do \c{make warnings} manually in the main directory in +order to be able to build the documentation, which means Perl needs to +be installed on the system. + +\b Add instructions for Intel Control Flow Enforcement Technology (CET). + \S{cl-2.15} Version 2.15 \b The comparison and booleanizing operators can now be used in any -- cgit v1.2.1 From f0dc62c6a680a3cad5baa39a05c88716fb181806 Mon Sep 17 00:00:00 2001 From: "H. Peter Anvin (Intel)" Date: Sat, 27 Jun 2020 16:15:25 -0700 Subject: NASM 2.15.01 --- version | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version b/version index e3d06964..25e73979 100644 --- a/version +++ b/version @@ -1 +1 @@ -2.15 +2.15.01 -- cgit v1.2.1 From fa7732e09244f5cb5c11e40636a08ea2f31e330c Mon Sep 17 00:00:00 2001 From: "H. Peter Anvin (Intel)" Date: Sat, 27 Jun 2020 16:40:52 -0700 Subject: doc: editorial cleanups Clean up the language of a few sections, add a few examples, and better document %pragma limit. Signed-off-by: H. Peter Anvin (Intel) --- doc/nasmdoc.src | 52 +++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 37 insertions(+), 15 deletions(-) diff --git a/doc/nasmdoc.src b/doc/nasmdoc.src index 8d815396..d19f24c7 100644 --- a/doc/nasmdoc.src +++ b/doc/nasmdoc.src @@ -923,10 +923,13 @@ shown in \k{opt-pragma} is the same as running this: \S{opt-limit} The \i\c{--limit-X} Option -This option allows user to setup various maximum values for these: +This option allows user to setup various maximum values after which +NASM will terminate with a fatal error rather than consume arbitrary +amount of compute time. Each limit can be set to a positive number or +\c{unlimited}. \b\c{--limit-passes}: Number of maximum allowed passes. Default is -effectively unlimited. +\c{unlimited}. \b\c{--limit-stalled-passes}: Maximum number of allowed unfinished passes. Default is 1000. @@ -946,13 +949,18 @@ under \c{%rep}. Default is 1000000. \b\c{--limit-eval}: This number sets the boundary condition of allowed expression length. Default is 8192 on most systems. -\b\c{--limit-lines}: Total number of source lines as allowed to be +\b\c{--limit-lines}: Total number of source lines allowed to be processed. Default is 2000000000. -In example, running this limits the maximum line count to be 1000. +For example, set the maximum line count to 1000: \c nasm --limit-lines 1000 +Limits can also be set via the directive \c{%pragma limit}, for +example: + +\c %pragma limit lines 1000 + \S{opt-keep-all} The \i\c{--keep-all} Option @@ -2492,23 +2500,37 @@ includes backwards compatibility aliases defined by NASM itself. To disable aliases without undefining them, use the \c{%aliases off} directive. -To check whether an alias is defined, use \c{%ifdefalias}. +To check whether an alias is defined, regardless of the existence of +the aliased macro, use \c{%ifdefalias}. -This +For example: +\c %defalias OLD NEW +\c ; OLD and NEW both undefined +\c %define NEW 123 +\c ; OLD and NEW both 123 +\c %undef OLD +\c ; OLD and NEW both undefined +\c %define OLD 456 +\c ; OLD and NEW both 456 +\c %undefalias OLD +\c ; OLD undefined, NEW defined to 456 \S{cond-comma} \i{Conditional Comma Operator}: \i\c{%,} -As of version 2.15, NASM has conditional comma operator \c{%,} that expands to a -comma unless followed by a null expansion, which allows suppressing the comma before an -empty argument. For example, all the expressions below are valid: +As of version 2.15, NASM has a conditional comma operator \c{%,} that +expands to a comma \e{unless} followed by a null expansion, which +allows suppressing the comma before an empty argument. This is +especially useful with greedy single-line macros. + +For example, all the expressions below are valid: \c %define greedy(a,b,c+) a + 66 %, b * 3 %, c \c -\c db greedy(1,2) -\c db greedy(1,2,3) -\c db greedy(1,2,3,4) -\c db greedy(1,2,3,4,5) +\c db greedy(1,2) ; db 1 + 66, 2 * 3 +\c db greedy(1,2,3) ; db 1 + 66, 2 * 3, 3 +\c db greedy(1,2,3,4) ; db 1 + 66, 2 * 3, 3, 4 +\c db greedy(1,2,3,4,5) ; db 1 + 66, 2 * 3, 3, 4, 5 \H{strlen} \i{String Manipulation in Macros} @@ -3402,8 +3424,8 @@ infinite loop in the preprocessor, which (on multitasking or multi-user systems) would typically cause all the system memory to be gradually used up and other applications to start crashing. -Note a maximum repeat count is limited by 62 bit number, though it -is hardly possible that you ever need anything bigger. +Note the maximum repeat count is limited to the value specified by the +\c{--limit-rep} option or \c{%pragma limit rep}, see \k{opt-limit}. \H{files} Source Files and Dependencies -- cgit v1.2.1 From 444905e48bc2e4e428064b3ad5ec6d6c5d23d2f1 Mon Sep 17 00:00:00 2001 From: "H. Peter Anvin (Intel)" Date: Sat, 27 Jun 2020 16:50:56 -0700 Subject: doc: some more cleanups and detailed specifications Some more mostly editorial changes. Signed-off-by: H. Peter Anvin (Intel) --- doc/nasmdoc.src | 29 +++++++++++++++++++---------- 1 file changed, 19 insertions(+), 10 deletions(-) diff --git a/doc/nasmdoc.src b/doc/nasmdoc.src index d19f24c7..86b2c826 100644 --- a/doc/nasmdoc.src +++ b/doc/nasmdoc.src @@ -475,29 +475,38 @@ Use this option to specify listing output details. Supported options are: -\c{-Lb} show builtin macro packages (standard and \c{%use}) +\b \c{-Lb} show builtin macro packages (standard and \c{%use}) -\c{-Ld} show byte and repeat counts in decimal, not hex +\b \c{-Ld} show byte and repeat counts in decimal, not hex -\c{-Le} show the preprocessed input +\b \c{-Le} show the preprocessed input -\c{-Lf} ignore \c{.nolist} and force listing output +\b \c{-Lf} ignore \c{.nolist} and force listing output -\c{-Lm} show multi-line macro calls with expanded parameters +\b \c{-Lm} show multi-line macro calls with expanded parameters -\c{-Lp} output a list file in every pass, in case of errors +\b \c{-Lp} output a list file in every pass, in case of errors -\c{-Ls} show all single-line macro definitions +\b \c{-Ls} show all single-line macro definitions -\c{-Lw} flush the output after every line (very slow!) +\b \c{-Lw} flush the output after every line (very slow!) -\c{-L+} enable \e{all} listing options +\b \c{-L+} enable \e{all} listing options These options can be enabled or disabled at runtime using the \c{%pragma list options} directive: \c %pragma list options [+|-]flags... +For example, to turn on the \c{d} and \c{m} flags but disable the +\c{s} flag: + +\c %pragma list options +dm -s + +For forward compatility reasons, an undefined flag will be +ignored. Thus, a new flag introduced in a newer version of NASM can be +specified without breaking older versions. Listing flags will always +be a single alphanumeric character and are case sensitive. \S{opt-M} The \i\c{-M} Option: Generate \i{Makefile Dependencies} @@ -910,7 +919,7 @@ Running this: \c nasm -f macho --pragma "macho gprefix _" -is equivalent to the example in \k{opt-pfix}. +is equivalent to the example in \k{opt-pfix}. See \k{pragma}. \S{opt-before} The \i\c{--before} Option -- cgit v1.2.1