diff options
-rw-r--r-- | Makefile.in | 5 | ||||
-rw-r--r-- | Mkfiles/msvc.mak | 2 | ||||
-rw-r--r-- | Mkfiles/openwcom.mak | 2 | ||||
-rw-r--r-- | doc/changes.src | 9 | ||||
-rw-r--r-- | doc/nasmdoc.src | 81 | ||||
-rwxr-xr-x | tools/release | 2 | ||||
-rw-r--r-- | x86/iflags.ph | 1 | ||||
-rw-r--r-- | x86/insns.dat | 16 |
8 files changed, 88 insertions, 30 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/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 diff --git a/doc/nasmdoc.src b/doc/nasmdoc.src index 8d815396..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 @@ -923,10 +932,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 +958,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 +2509,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 +3433,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 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" 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 |