The NASM 3 series added support for the APX instruction encodings (extended GPRs), as well as preprocessor enhancements meant to make evolving code simpler.
It is the production version of NASM since 2025.
Fix build problems on C23 compilers using a pre-C23 version of
<stdbool.h> which defines bool as a macro
in violation of the C23 specification.
The immediate form of the JMPE instruction (opcode
0F B8) has been changed to an absolute address, as in the
Itanium Architecture Software Developer's Manual, version 2.3, Volume 4,
page 4:249. Hopefully this won't break whatever virtual environments use
JMPE, but it is the closest thing there is to an official
specification for this opcode.
Being an absolute address, treat it equivalent to a
FAR jump and do not default to 64 bits in 64-bit mode.
That JMPE has apparently been wrong all these years is
probably as good of a hint as any how much it has been actually used, but
it does have the possibility of breaking virtual environments. In
that case, please file a bug report to
https://bugs.nasm.us with
details about the virtual environment, and we will figure out a suitable
solution.
Various build fixes. Fix the documentation not building on MacOS because
of the cp utility lacking -u there. Also fix not
building generally due to wrong link formatting. Another fix was a typo in
compiler.h related to a C++ check.
Corrections to assembling encodings:
Fix CMP allowing LOCK which is illegal.
Correct multiple AVX512 instructions such as
VCVTSD2SI, VCVTSD2USI, VCVTSS2SI,
VCVTSS2USI, VCVTTSD2SI, VCVTTSD2USI,
VCVTTSS2SI, VCVTTSS2USI, VGETEXPSH,
VGETMANTSH, MOVDDUP, VMOVDDUP.
Fixed other encodings or instruction formats for instructions
UWRMSR, CMPSD, VCMPSS,
V4FMADDSS, V4FNMADDSS, VCVTDQ2PH,
VCVTPD2PH, VCVTPH2UDQ, VCVTQQ2PH,
VCVTUDQ2PH, VCVTUQQ2PH, VGETEXPSH,
VGETMANTSH, VRCPPH, VRSQRTPH,
VCVTPH2BF8, VCVTPH2BF8S, VCVTPH2HF8,
VCVTPH2HF8S.
Fixed typos in VP4DPWSSD mnemonic.
Fixed BYTE and WORD operands getting the same
encoding on arithmetic instructions such as CMP.
Fixed PUSH not assembling when used with a
DWORD in 64-bit mode. This is not a recommended syntax as the
operand size is still 64 bits, but was permitted by earlier versions of
NASM.
Fix parsing of $–escaped symbols in directives
(GLOBAL, STATIC, EXTERN,
REQUIRED, COMMON).
Corrections to disassembling:
Shift instructions with the unity operand were getting disassembled to a zero operand instead of one.
JMP, CALL and JMPE disassembled
incorrectly with the register operands.
Whole bunch of minor fixes to operand sizes, operand size prefixes. Changes mostly return the behavior known from 2.16.03.
MOV [mem], label would be accepted without size specifiers
which could cause unintended consequences. Raise an error if no size was
specified and one of the operands is a memory reference and another
operands is a label.
JMP NEAR is now the same as JMP STRICT NEAR as
the STRICT is redundant here. JMP WORD on the
other hand is up for optimization as NEAR and
WORD relate to different things – jump lengths and
operation sizes respectively.
Using redundant (or not) but valid operands size prefixes was fixed on
instructions such as IRET, PUSHF,
POPF, PUSH and POP.
Using an operand size prefix on a JMP or CALL
instruction could generate an invalid instruction. This appears to have
been a long-standing bug. Specifying the operand size by specifying the
size of the immediate explicitly (e.g. JMP DWORD label) has
always worked correctly, however.
Add support for C2y-style \o escape sequences, braced
escape sequences, and as NASM extensions, decimal escape sequences
(\d) and control-character escape sequences (\^).
See section 3.4.2.
Fix generation of the short opcodes for ADD,
OR, ADC, SBB, AND,
SUB, XOR, and CMP AL,imm8.
Fix truncation of the generated constant to 63 bits when invoking a
single-line macro when an argument is defined as =/b or
=/ub.
Add an %env() preprocessor function as a more robust and
flexible alternative to the %! construct. See
section 5.5.7.
The maximum number of multi-line macro parameters is now a configurable limit. See section 2.1.32.
The --limit- options and %pragma limit now
accept the keywords default, maximum, and
reset. See section
2.1.32.
Fix parsing of seg:offs–style FAR
pointers in EQU.
Fix the %clear preprocessor directive hanging when given
parameters.
The never properly implemented (or documented) preprocessor directives
%rmacro and %irmacro are now properly disabled;
to avoid breaking existing code, they fall back to %macro and
%imacro with a suitable warning.
Programmers should not rely on this behavior: in the future, these directives might actually be (properly) implemented.
Fix a crash when -M directives were used in response files.
New listing option -Lc to include the contents of
INCBIN files, see section
2.1.4.
New listing option -Lt to include the output from every
iteration of TIMES and ALIGN directives, see
section 2.1.4.
The %pragma list options directive now support resetting
options to their command-line default, see
section 2.1.4.
New predefined macros __?LIST_OPTIONS?__ and
__?LIST_OPTIONS_DEFAULT?__ to query the active and
command-line default listing options. See
section 2.1.4.
A new obj2 version of the obj output format,
intended for use on OS/2. See section
9.5.
The condition after %if or %elif would be
evaluated while output is suppressed after %exitrep or
%exitmacro. Although no output would be generated in either
case, assembly would fail if evaluating the expression triggered an error.
Fix encoding of TCVTROWPS2PHL, correct multiple AVX512-BF16
instructions' operand formats and typoed mnemonics.
The unofficial but obvious alternate form TEST reg,mem was
not accepted by NASM 3.00; corrected.
For the obj output format, multiple GROUP
directives can now be specified for the same group; the resulting group
includes all sections specified in all GROUP directives for
the group.
A new %selbits() preprocessor function. See
section 5.5.21.
A new --bits option as convenience shorthand for
--before "BITS ...". See
section 2.1.31.
The options and pragmas for configuring external label mangling were
inconsistent, the former using the spelling postfix and the
latter suffix. Furthermore, these were also documented as
directives in addition to pragmas. Implement the already
documented directives (bracketed forms only) and allow both
postfix and suffix in all cases.
See section 2.1.28 and section 8.10.
Define additional permissive patterns and fix several opcode bugs.
Fix parsing of two-operand forms of x87 instructions.
Fix bogus "absolute address can not be RIP-relative" warning.
Hopefully fix building with OpenWatcom.
Generate a warning, promoted to error by default, on the use of
o64 prefixes in 16- or 32-bit mode. If demoted to a warning or
suppressed the prefix is ignored, but likely will trigger subsequent,
harder to debug, error messages.
More consistent handling of jump and call instructions with specified operand sizes.
Fix an operand size handling bug in the CMPXCHG
instruction.
Improve the documentation for building from source (appendix D).
Add support for the APX and AVX10 instruction sets, and various miscellaneous new instructions.
Add new preprocessor functions: %b2hs(),
%chr(), %depend(), %find(),
%findi(), %hs2b(), %null(),
%ord(), %pathsearch(), and
%realpath(). See section
5.5.
New preprocessor directive %note to insert a note in the
list file, without issuing an external diagnosic. Unlike a comment, it is
optionally macro-expanded, see section
5.12.
New preprocessor directive %iffile (and corresponding
function %isfile()) to test for the existence of a file. See
section 5.7.12.
New preprocessor directive %ifdirective to test for the
existence of a preprocessor directive, assembly directive, or
pseudo-instruction; see section
5.7.10.
Fix a number of invalid memory references (usually causing crashes) on various invalid inputs.
Fix multiple bugs in the handling of $–escaped
symbols.
The use of $ as a prefix for hexadecimal numbers has been
deprecated, and will now issue a warning. A new directive
[DOLLARHEX] can be used to disable this syntax entirely, see
section 8.12.
Fix the generation of segment selector references (mainly used in the
obj output format.)
Fix crash in the obj backend when code was emitted into the
default segment, without any labels having been defined.
Clean up the command-line help text (-h) and break it down
into individual topics, as the previous output was just too verbose to be
practical as a quick reference.
The implicit DEFAULT ABS in 64-bit mode is deprecated and
may be changed to REL in the future. See
section 8.2. A warning is now emitted
for this condition.
It is now possible to set the REL/ABS default
for memory accesses using FS: or GS:, see
section 8.2.
The __?DEFAULT?__ standard macro now reflects the settings
of the DEFAULT directive. See
section 6.4.
The NASM preprocessor now assumes that an unknown directive starting
with %if or %elif is a misspelled or not yet
implemented conditional directive, and tries to match it with a
corresponding %endif. See
section 5.7.14.
The masm macro package now defines a macro for x87 register
syntax. See section 7.5.
A new macro package, vtern, to simplify generation of the
control immediates for the VPTERNLOGD and
VPTERNLOGQ instructions. See
section 7.6.
A new command line option -LF allows overriding
[LIST -] directives.
In the obj output format, allow a segment in the
FLAT pseudo-group to also belong to another (real) group. Used
on OS/2.
Add a new build_version directive to the Mach-O backend.
See section 9.9.6.
Fix a spec violation in the generation of DWARF debugging information on ELF.
Response files can now be nested.
Many documentation improvements.
The NASM 2 series added support for x86-64, and was the production versions of NASM from 2007 to 2025.
This is a source build machinery and documentation update only. There are no functionality changes.
Fix building from git in a separate directory from the
source.
Remove some irrelevant files from the source distribution.
Make the documentation stronger that -O0 or
-O1 are probably not what the user wants. See
section 2.1.24.
Fix configure --enable-lto build option.
Update the included RPM .spec file.
Fix building from the source distribution in a separate directory from the source.
Fix a number of issues when building from source, mostly involving
configure or dependency generation.
In particular, more aggressively avoid cross-compilation problems on
Unix/Linux systems automatically invoking WINE. We could end up invoking
WINE even when we didn't want to, making configure think it
was running native when in fact cross-compiling.
Hopefully fix compiling with the latest versions of MSVC/nmake.
Windows host: add embedded manifest file. Without a manifest, Windows
applications force a fixed PATH_MAX limit to any pathname;
this is unnecessary.
Add support VEX-encoded SM4-NI instructions.
Add support for VEX-encoded SM3-NI instructions.
Add support for VEX-encoded SHA512-NI instructions.
PTWRITE opcode corrected (F3 prefix required.)
Disassembler: the SMAP instructions are NP; notably the
prefixed versions of CLAC are
ERETU/ERETS.
Add support for Flexible Return and Exception Delivery (FRED): the
LKGS, ERETS and ERETU instructions.
Fix external references to segments in the obj (OMF) and
possibly other output formats.
Always support up to 8 characters, i.e. 64 bits, in a string-to-numeric conversion.
Preprocessor: add %map() function to expand a macro from a
list of arguments, see section
5.5.14.
Preprocessor: allow the user to specify the desired radix for an
evaluated parameter. It doesn't make any direct difference, but can be nice
for debugging or turning into strings. See the = modifier in
section 5.3.1.
Update documentation: __USE_package__
is now __?USE_package?__.
Documentation: correct a minor problem in the expression grammar for
Dx statements, see
section 3.2.1.
Preprocessor: correctly handle empty %rep blocks.
Preprocessor: add options for a base prefix to %num(), see
section 5.5.16.
Preprocessor: add a %hex() function, equivalent to
%eval() except that it producess hexadecimal values that are
nevertheless valid NASM numeric constants, see
section 5.5.10.
Preprocessor: fix the parameter number in error messages (should be
1-based, like %num references to multi-line macro
arguments.)
Documentation: be more clear than the bin format is simply
a linker built into NASM. See section
9.1.
Adjust the LOCK prefix warning for XCHG.
LOCK XCHG reg,mem would
issue a warning for being unlockable, which is incorrect. In this case the
reg,mem encoding is simply an alias for the
mem,reg encoding. However, XCHG
is always locked, so create a new warning
(-w+prefix-lock-xchg) to explicitly flag a user-specified
LOCK XCHG; default off. Future versions of NASM may remove the
LOCK prefix when optimization is enabled.
Fix broken dependency-list generation.
Add optional warnings for specific relocation types
(-w+reloc-*, see appendix A),
default off.
Some target environments may have specific restrictions on what kinds of relocations are possible or allowed.
Error out on certain bad syntax in Dx statements,
such as db 1 2. See
section 3.2.1.
This is a documentation update release only. There are no functionality changes.
Fix the creation of the table of contents in the HTML version of the documentation.
Support for the rdf format has been discontinued and all
the RDOFF utilities has been removed.
The --reproducible option now leaves the filename field in
the COFF object format blank. This was always rather useless since it is
only 18 characters long; as such debug formats have to carry their own
filename information anyway.
Fix handling of MASM-syntax reserved memory (e.g. dw ?)
when used in structure definitions.
The preprocessor now supports functions, which can be less verbose and more convenient than the equivalent code implemented using directives. See section 5.5.
Fix the handling of %00 in the preprocessor.
Fix incorrect handling of path names affecting error messages, dependency generation, and debug format output.
Support for the RDOFF output format and the RDOFF tools have been
removed. The RDOFF tools had already been broken since at least NASM 2.14.
For flat code the ELF output format recommended; for segmented code the
obj (OMF) output format.
New facility: preprocessor functions. Preprocessor functions, which are expanded similarly to single-line macros, can greatly simplify code that in the past would have required a lengthy list of directives and intermediate macros. See section 5.5.
Single-line macros can now declare parameters (using a
&& prefix) that creates a quoted string, but does
not requote an already quoted string. See
section 5.3.1.
Instruction table updated per public information available as of November 2022.
All warnings in the preprocessor have now been assigned warning classes. See appendix A.
Fix the invalid use of RELA–type relocations instead
of REL–type relocations when generating DWARF debug
information for the elf32 output format.
Fix the handling at in istruc when the
structure contains local labels. See
section 6.14.2.
When assembling with --reproducible, don't encode the
filename in the COFF header for the coff, win32
or win64 output formats. The COFF header only has space for an
18-character filename, which makes this field rather useless in the first
place. Debug output data, if enabled, is not affected.
Fix incorrect size calculation when using MASM syntax for non-byte
reservations (e.g. dw ?.)
Allow forcing an instruction in 64-bit mode to have a (possibly
redundant) REX prefix, using the syntax {rex} as a prefix.
Add a {vex} prefix to enforce VEX (AVX) encoding of an
instruction, either using the 2- or 3-byte VEX prefixes.
The CPU directive has been augmented to allow control of
generation of VEX (AVX) versus EVEX (AVX-512) instruction formats, see
section 8.11.
Some recent instructions that previously have been only available using
EVEX encodings are now also encodable using VEX (AVX) encodings. For
backwards compatibility these encodings are not enabled by default, but can
be generated either via an explicit {vex} prefix or by
specifying either CPU LATEVEX or CPU NOEVEX; see
section 8.11.
Document the already existing %unimacro directive. See
section 5.6.12.
Fix a code range generation bug in the DWARF debug format (incorrect
information in the DW_AT_high_pc field) for the ELF output
formats. This bug happened to cancel out with a bug in older versions of
the GNU binutils linker, but breaks with other linkers and updated or other
linkers that expect the spec to be followed.
Fix segment symbols with addends, e.g. jmp _TEXT+10h:0 in
output formats that support segment relocations, e.g. the obj
format.
Fix various crashes and hangs on invalid input.
Fix %ifid $ and %ifid $$ incorrectly being
treated as true. See section 5.7.7.
Add --reproducible option to suppress NASM version numbers
and timestamps in output files. See
section 2.1.35.
More sensible handling of the case where one single-line macro definition will shadow another. A warning will be issued, but the additional definition will be allowed. For the existing error case where both a parameterless and parametered macro are created, that warning is promoted to an error by default.
Add special preprocessor tokens %*? and %*??
that expand like %? and %?? in single-line macros
only. See section 5.3.6.
Correct the encoding of the ENQCMDS and
TILELOADT1 instructions.
Fix case where the COFF backend (the coff,
win32 and win64 output formats) would add padding
bytes in the middle of a section if a
SECTION/SEGMENT directive was provided which
repeated an ALIGN= attribute. This neither matched legacy
behavior, other backends, or user expectations.
Fix SSE instructions not being recognized with an explicit memory
operation size (e.g. movsd qword [eax],xmm0).
The -L+ option no longer enables -Lw, which is
mainly useful to debug NASM crashes. See
section 2.1.4.
Document long-standing hazards in the use of $ in
Dx statements, see
section 3.2.1.
The NASM-only RDOFF output format backend, which has been broken since
at least NASM 2.14, has been disabled. The RDOFF tools are scheduled to be
removed from the NASM distribution in NASM 2.16. If you have a concrete use
case for RDOFF, please file a NASM bug report at
https://bugs.nasm.us/ as
soon as possible.
Add instructions from the Intel Instruction Set Extensions and Future
Features Programming Reference, June 2020. This includes AVX5512
bfloat16, AVX512 mask intersect, and Intel Advanced Matrix
Extensions (AMX).
Support for bfloat16 floating-point constants. See
section 3.4.6 and
section 7.3.
Properly display warnings in preprocess-only mode.
Fix copy-and-paste of examples from the PDF documentation.
Debug information now properly reflect the line numbers of macro
invocations (unless declared .nolist).
Fix excessive alignment of sections in the
coff/win32/win64 output formats when
the user-specified alignment is less than the default alignment for the
section or section type.
Fix explicit token pasting (%+,
section 5.3.4) for the cases where
one or more parts result from empty token expansion, resulting in
%+ tokens at the beginning or end, or multiple ones in a row.
Fix macro label capture (%00,
section 5.6.7).
Much better documentation for the MASM compatibility package,
%use masm (see section
7.5).
Fix LEA without square brackets, for MASM compatibility.
Portability fixes.
Fix miscompilation when building with clang.
Add db-empty warning class, see
section 2.1.26.
Fix the dependencies in the MSVC NMAKE makefile
(Mkfiles/msvc.mak).
Some documentation improvements and cleanups.
Fix the handling of macro parameter ranges (%{:}),
including with brace-enclosed original arguments.
Fix building the documentation from the release archive. For 2.15, the
user has to do 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.
Add instructions for Intel Control Flow Enforcement Technology (CET).
The comparison and booleanizing operators can now be used in any
expression context, not just %if. See
section 3.5.
New operator ? ... :. See
section 3.5.1.
Signed shift operators <<< and
>>>. See section
3.5.9.
The MASM DUP syntax for data definitions is now supported,
in a somewhat enhanced form. See
section 3.2.1.
Warn for strange legacy behavior regarding empty arguments in multi-line
macro expansion, but try to match legacy behavior in most cases. Legacy
behavior can be disabled with the directive
%pragma preproc sane_empty_expansion, see
section 5.6 and
section 5.13.1.
A much more sensible limit to expression evaluation depth. The previously defined limit would rarely trigger before NASM died with a stack overrun error on most systems. See section 2.1.32.
The state of warnings can now be saved and restored via the
[WARNING PUSH] and [WARNING POP] directives. See
section 8.14.
The sectalign on|off switch does not affect an explicit
directive. See section 6.15.2.
Added configure option to enable building with profiling
(--enable-profiling).
Attempt to support of long path names, up to 32767 of UTF-16 characters, on Windows.
Fixed 'mismatch in operand sizes' error in the MOVDDUP,
CMPXCHG8B and CMPXCHG16B instructions.
Improved error messages in the string transformation routine.
Removed obsolete gnu-elf-extensions warning about 8- and
16-bit relocation generation. See
section 9.10.8
Added group aliases for all prefixed warnings. See section 2.1.26.
Allowed building with MSVC versions older than 1700.
Added implicitly sized versions of the K... instructions,
which allows the K... instructions to be specified without a
size suffix as long as the operands are sized.
Added -L option for additional listing information. See
section 2.1.4.
Added some warnings for obsolete instructions for a specified CPU.
Deprecated -hf and -y options. Use
-h instead.
Made DWARF as the default debug format for ELF.
Added %pragma list options... to set or clear
listing options (see opt-L).
Allowed immediate syntax for LEA instruction (ignore
operand size completely).
Added limited functionality MASM compatibility package. See section 7.5.
Add single-line macros aliases using %defalias or
%idefalias. These behave like a kind of "symbolic links" for
single-line macros. See section
5.3.11 and clear.
Added support for stringify, nostrip, evaluating, and greedy single-line macro arguments. See section 5.3.1.
Unused single-line macro arguments no longer need to have a specified name. See section 5.3.1.
Added conditional comma operator %,. See
section 5.3.12.
Changed private namespace from __foo__ to
__?foo?__, so a user namespace starting from underscore is now
clean from symbols. For backwards compatibility, the previous names are
defined as aliases; see section
5.3.11, section 5.14.3 and
chapter 6.
Added support of ELF weak symbols and external references. See section 9.10.5.
Changed the behavior of the EXTERN keyword and introduced REQUIRED keyword. See section 8.6.
Added %ifusable and %ifusing directives. See
chapter 7.
Made various performance improvements and stability fixes in macro preprocessor engine.
Improved NASM error handling and cleaned up error messages.
Many, many bug fixes.
Suppress nuisance "label changed during code generation"
messages after a real error.
Add support for the merge and strings
attributes on ELF sections. See
section 9.10.2.
Add support for the note, preinit_array,
init_array, and fini_array sections type in ELF.
See section 9.10.2.
Handle more than 32,633 sections in ELF.
Fix crash due to multiple errors or warnings during the code generation pass if a list file is specified.
Create all system-defined macros before processing command-line given
preprocessing directives (-p, -d,
-u, --pragma, --before).
If debugging is enabled, define a __DEBUG_FORMAT__
predefined macro. See section 6.6.
Fix an assert for the case in the obj format when a
SEG operator refers to an EXTERN symbol declared
further down in the code.
Fix a corner case in the floating-point code where a binary, octal or hexadecimal floating-point having at least 32, 11, or 8 mantissa digits could produce slightly incorrect results under very specific conditions.
Support -MD without a filename, for gcc
compatibility. -MF can be used to set the dependencies output
filename. See section 2.1.8.
Fix -E in combination with -MD. See
section 2.1.22.
Fix missing errors on redefined labels; would cause convergence failure instead which is very slow and not easy to debug.
Duplicate definitions of the same label with the same value is now explicitly permitted (2.14 would allow it in some circumstances.)
Add the option --no-line to ignore %line
directives in the source. See section
2.1.34 and section 5.14.1.
Changed -I option semantics by adding a trailing path
separator unconditionally.
Fixed null dereference in corrupted invalid single line macros.
Fixed division by zero which may happen if source code is malformed.
Fixed out of bound access in processing of malformed segment override.
Fixed out of bound access in certain EQU parsing.
Fixed buffer underflow in float parsing.
Added SGX (Intel Software Guard Extensions) instructions.
Added +n syntax for multiple contiguous registers.
Fixed subsections_via_symbols for macho object
format.
Added the --gprefix, --gpostfix,
--lprefix, and --lpostfix command line options,
to allow command line base symbol renaming. See
section 2.1.28.
Allow label renaming to be specified by %pragma in addition
to from the command line. See section
8.10.
Supported generic %pragma namespaces, output
and debug. See section
5.13.
Added the --pragma command line option to inject a
%pragma directive. See
section 2.1.29.
Added the --before command line option to accept preprocess
statement before input. See section
2.1.30.
Added AVX512 VBMI2 (Additional Bit
Manipulation), VNNI (Vector Neural Network),
BITALG (Bit Algorithm), and GFNI (Galois Field
New Instruction) instructions.
Added the STATIC directive for local symbols that should be
renamed using global-symbol rules. See
section 8.9.
Allow a symbol to be defined as EXTERN and then later
overridden as GLOBAL or COMMON. Furthermore, a
symbol declared EXTERN and then defined will be treated as
GLOBAL. See section 8.5.
The GLOBAL directive no longer is required to precede the
definition of the symbol.
Support private_extern as macho specific
extension to the GLOBAL directive. See
section 9.9.5.
Updated UD0 encoding to match with the specification
Added the --limit-X command line option to set execution
limits. See section 2.1.32.
Updated the Codeview version number to be aligned with
MASM.
Added the --keep-all command line option to preserve output
files. See section 2.1.33.
Added the --include command line option, an alias to
-P (section 2.1.19).
Added the --help command line option as an alias to
-h (section 3.1).
Added -W, -D, and -Q suffix
aliases for RET instructions so the operand sizes of these
instructions can be encoded without using o16,
o32 or o64.
Added AVX and AVX512 VAES* and VPCLMULQDQ
instructions.
Fixed missing dwarf record in x32 ELF output format.
Fix false positive in testing of numeric overflows.
Fix generation of PEXTRW instruction.
Fix smartalign package which could trigger an error during
optimization if the alignment code expanded too much due to optimization of
the previous code.
Fix a case where negative value in TIMES directive causes
panic instead of an error.
Always finalize .debug_abbrev section with a null in
dwarf output format.
Support debug flag in section attributes for
macho output format. See
section 9.9.1.
Support up to 16 characters in section names for macho
output format.
Fix missing update of global BITS setting if
SECTION directive specified a bit size using output
format-specific extensions (e.g. USE32 for the
obj output format.)
Fix the incorrect generation of VEX-encoded instruction when static mode decorators are specified on scalar instructions, losing the decorators as they require EVEX encoding.
Option -MW to quote dependency outputs according to Watcom
Make conventions instead of POSIX Make conventions. See
section 2.1.12.
The obj output format now contains embedded dependency file
information, unless disabled with %pragma obj nodepend. See
section 9.4.9.
Fix generation of dependency lists.
Fix a number of null pointer reference and memory allocation errors.
Always generate symbol-relative relocations for the macho64
output format; at least some versions of the XCode/LLVM linker fails for
section-relative relocations.
Fix incorrect output for some types of FAR or
SEG references in the obj output format, and
possibly other 16-bit output formats.
Fix the address in the list file for an instruction containing a
TIMES directive.
Fix error with TIMES used together with an instruction
which can vary in size, e.g. JMP.
Fix breakage on some uses of the DZ pseudo-op.
Support the official forms of the UD0 and UD1
instructions.
Allow self-segment-relative expressions in immediates and displacements, even when combined with an external or otherwise out-of-segment special symbol, e.g.:
extern foo
mov eax,[foo - $ + ebx] ; Now legal
Handle a 64-bit origin in NDISASM.
NASM can now generate sparse output files for relevant output formats, if the underlying operating system supports them.
The macho object format now supports the
subsections_via_symbols and no_dead_strip
directives, see section 9.9.4.
The macho object format now supports the
no_dead_strip, live_support and
strip_static_syms section flags, see
section 9.9.1.
The macho object format now supports the dwarf
debugging format, as required by newer toolchains.
All warnings can now be suppressed if desired; warnings not otherwise
part of any warning class are now considered its own warning class called
other (e.g. -w-other). Furthermore,
warning-as-error can now be controlled on a per warning class basis, using
the syntax -w+error=warning-class and its equivalent
for all other warning control options. See
section 2.1.26 for the
command-line options and warning classes and
section 8.14 for the
[WARNING] directive.
Fix a number of bugs related to AVX-512 decorators.
Significant improvements to building NASM with Microsoft Visual Studio
via Mkfiles/msvc.mak. It is now possible to build the full
Windows installer binary as long as the necessary prerequisites are
installed; see Mkfiles/README
To build NASM with custom modifications (table changes) or from the git tree now requires Perl 5.8 at the very minimum, quite possibly a higher version (Perl 5.24.1 tested.) There is no requirement to have Perl on your system at all if all you want to do is build unmodified NASM from source archives.
Fix the {z} decorator on AVX-512 VMOVDQ*
instructions.
Add new warnings for certain dangerous constructs which never ought to
have been allowed. In particular, the RESx family of
instructions should have been taking a critical expression all along.
Fix the EVEX (AVX-512) versions of the VPBROADCAST,
VPEXTR, and VPINSR instructions.
Support contracted forms of additional instructions. As a general rule, if an instruction has a non-destructive source immediately after a destination register that isn't used as an input, NASM supports omitting that source register, using the destination register as that value. This among other things makes it easier to convert SSE code to the equivalent AVX code:
addps xmm1,xmm0 ; SSE instruction
vaddps ymm1,ymm1,ymm0 ; AVX official long form
vaddps ymm1,ymm0 ; AVX contracted form
Fix Codeview malformed compiler version record.
Add the CLWB and PCOMMIT instructions. Note
that the PCOMMIT instruction has been deprecated and will
never be included in a shipping product; it is included for completeness
only.
Add the %pragma preprocessor directive for soft-error
directives.
Add the RDPID instruction.
Fix preprocessor errors, especially %error and
%warning, inside %if statements.
Fix relative relocations in 32-bit Mach-O.
More Codeview debug format fixes.
If the MASM PTR keyword is encountered, issue a warning.
This is much more likely to indicate a MASM-ism encountered in NASM than it
is a valid label. This warning can be suppressed with -w-ptr,
the [warning] directive (see
section 2.1.26) or by the macro
definition %idefine ptr $%? (see
section 5.3.5).
When an error or a warning comes from the expansion of a multi-line
macro, display the file and line numbers for the expanded macros. Macros
defined with .nolist do not get displayed.
Add macros ilog2fw() and ilog2cw() to the
ifunc macro package. See
section 7.4.1.
Portability fixes for some platforms.
Fix error when not specifying a list file.
Correct the handling of macro-local labels in the Codeview debugging format.
Add CLZERO, MONITORX and MWAITX
instructions.
Major fixes to the macho backend
(section 9.9); earlier versions would
produce invalid symbols and relocations on a regular basis.
Support for thread-local storage in Mach-O.
Support for arbitrary sections in Mach-O.
Fix wrong negative size treated as a big positive value passed into backend causing NASM to crash.
Fix handling of zero-extending unsigned relocations, we have been printing wrong message and forgot to assign segment with predefined value before passing it into output format.
Fix potential write of oversized (with size greater than allowed in output format) relative relocations.
Portability fixes for building NASM with the LLVM compiler.
Add support of Codeview version 8 (cv8) debug format for
win32 and win64 formats in the COFF
backend, see section 9.6.5.
Allow 64-bit outputs in 16/32-bit only backends. Unsigned 64-bit
relocations are zero-extended from 32-bits with a warning (suppressible via
-w-zext-reloc); signed 64-bit relocations are an error.
Line numbers in list files now correspond to the lines in the source files, instead of simply being sequential.
There is now an official 64-bit (x64 a.k.a. x86-64) build for Windows.
Fix potential stack overwrite in macho32 backend.
Fix relocation records in macho64 backend.
Fix symbol lookup computation in macho64 backend.
Adjust .symtab and .rela.text sections
alignments to 8 bytes in elf64 backed.
Fix section length computation in bin backend which leaded
in incorrect relocation records.
Fix section length computation in bin backend which leaded
in incorrect relocation records.
Add a warning for numeric preprocessor definitions passed via command line which might have unexpected results otherwise.
Add ability to specify a module name record in rdoff linker
with -mn option.
Increase label length capacity up to 256 bytes in rdoff
backend for FreePascal sake, which tends to generate very long labels for
procedures.
Fix segmentation failure when rip addressing is used in
macho64 backend.
Fix access on out of memory when handling strings with a single grave. We have sixed similar problem in previous release but not all cases were covered.
Fix NULL dereference in disassembled on BND instruction.
Fix 256 bit VMOVNTPS instruction.
Fix -MD option handling, which was rather broken in
previous release changing command line api.
Fix access to uninitialized space when handling strings with a single grave.
Fix nil dereference in handling memory reference parsing.
Update AVX512 instructions based on the Extension Reference (319433-021 Sept 2014).
Fix the behavior of -MF and -MD options
(Bugzilla 3392280)
Updated Win32 Makefile to fix issue with build
Add --v as an alias for -v (see
section 2.1.27), for command-line
compatibility with Yasm.
Fix a bug introduced in 2.11.03 whereby certain instructions would contain multiple REX prefixes, and thus be corrupt.
Removed an invalid error checking code. Sometimes a memref only with a displacement can also set an evex flag. For example:
vmovdqu32 [0xabcd]{k1}, zmm0
Fixed a bug in disassembler that EVEX.L'L vector length was not matched when EVEX.b was set because it was simply considered as EVEC.RC. Separated EVEX.L'L case from EVEX.RC which is ignored in matching.
Fix a bug there REX prefixes were missing on instructions inside a
TIMES statement.
Add the XSAVEC, XSAVES and
XRSTORS family instructions.
Add the CLFLUSHOPT instruction.
Allow instructions which implicitly uses XMM0
(VBLENDVPD, VBLENDVPS, PBLENDVB and
SHA256RNDS2) to be specified without an explicit
xmm0 on the assembly line. In other words, the following two
lines produce the same output:
vblendvpd xmm2,xmm1,xmm0 ; Last operand is fixed xmm0
vblendvpd xmm2,xmm1 ; Implicit xmm0 omitted
In the ELF backends, don't crash the assembler if
section align is specified without a value.
Add support for the Intel AVX-512 instruction set:
16 new, 512-bit SIMD registers. Total 32 (ZMM0 ~ ZMM31)
8 new opmask registers (K0 ~ K7). One of 7 registers
(K1 ~ K7) can be used as an opmask for conditional execution.
A new EVEX encoding prefix. EVEX is based on VEX and provides more capabilities: opmasks, broadcasting, embedded rounding and compressed displacements.
- opmask
VDIVPD zmm0{k1}{z}, zmm1, zmm3 ; conditional vector operation
; using opmask k1.
; {z} is for zero-masking
- broadcasting
VDIVPS zmm4, zmm5, [rbx]{1to16} ; load single-precision float and
; replicate it 16 times. 32 * 16 = 512
- embedded rounding
VCVTSI2SD xmm6, xmm7, {rz-sae}, rax ; round toward zero. note that it
; is used as if a separate operand.
; it comes after the last SIMD operand
Add support for ZWORD (512 bits), DZ and
RESZ.
Add support for the MPX and SHA instruction sets.
Better handling of section redefinition.
Generate manpages when running 'make dist'.
Handle all token chains in mmacro params range.
Support split [base,index] effective address:
mov eax,[eax+8,ecx*4] ; eax=base, ecx=index, 4=scale, 8=disp
This is expected to be most useful for the MPX instructions.
Support BND prefix for branch instructions (for MPX).
The DEFAULT directive can now take BND and
NOBND options to indicate whether all relevant branches should
be getting BND prefixes. This is expected to be the normal for
use in MPX code.
Add {evex}, {vex3} and {vex2}
instruction prefixes to have NASM encode the corresponding instruction, if
possible, with an EVEX, 3-byte VEX, or 2-byte VEX prefix, respectively.
Support for section names longer than 8 bytes in Win32/Win64 COFF.
The NOSPLIT directive by itself no longer forces a single
register to become an index register, unless it has an explicit multiplier.
mov eax,[nosplit eax] ; eax as base register
mov eax,[nosplit eax*1] ; eax as index register
Pregenerate man pages.
Fix VMOVNTDQA, MOVNTDQA and
MOVLPD instructions.
Fix collision for VGATHERQPS, VPGATHERQD
instructions.
Fix VPMOVSXBQ, VGATHERQPD, VSPLLW
instructions.
Add a bunch of AMD TBM instructions.
Fix potential stack overwrite in numbers conversion.
Allow byte size in PREFETCHTx instructions.
Make manual pages up to date.
Make F3 and F2 SSE prefixes to override
66.
Support of AMD SVM instructions in 32 bit mode.
Fix near offsets code generation for JMP, CALL
instrictions in long mode.
Fix preprocessor parse regression when id is expanding to a whitespace.
Fix line continuation parsing being broken in previous version.
Always quote the dependency source names when using the automatic dependency generation options.
If no dependency target name is specified via the -MT or
-MQ options, quote the default output name.
Fix assembly of shift operations in CPU 8086 mode.
Fix incorrect generation of explicit immediate byte for shift by 1 under certain circumstances.
Fix assembly of the VPCMPGTQ instruction.
Fix RIP-relative relocations in the macho64 backend.
Add the CLAC and STAC instructions.
Add back the inadvertently deleted 256-bit version of the
VORPD instruction.
Correct disassembly of instructions starting with byte 82
hex.
Fix corner cases in token pasting, for example:
%define N 1e%++%+ 5
dd N, 1e+5
Correct the assembly of the instruction:
XRELEASE MOV [absolute],AL
Previous versions would incorrectly generate F3 A2 for this
instruction and issue a warning; correct behavior is to emit
F3 88 05.
Add the ifunc macro package with integer functions,
currently only integer logarithms. See
section 7.4.
Add the RDSEED, ADCX and ADOX
instructions.
Add missing VPMOVMSKB instruction with reg32, ymmreg operands.
When optimization is enabled, mov r64,imm now optimizes to
the shortest form possible between:
mov r32,imm32 ; 5 bytes
mov r64,imm32 ; 7 bytes
mov r64,imm64 ; 10 bytes
To force a specific form, use the STRICT keyword, see
section 3.7.
Add support for the Intel AVX2 instruction set.
Add support for Bit Manipulation Instructions 1 and 2.
Add support for Intel Transactional Synchronization Extensions (TSX).
Add support for x32 ELF (32-bit ELF with the CPU in 64-bit mode.) See section 9.10.
Add support for bigendian UTF-16 and UTF-32. See section 3.4.5.
Fix up NSIS script to protect uninstaller against registry keys absence or corruption. It brings in a few additional questions to a user during deinstallation procedure but still it is better than unpredictable file removal.
Fix initialization of section attributes of bin output
format.
Fix mach64 output format bug that crashes NASM due to NULL
symbols.
Fix __OUTPUT_FORMAT__ assignment when output driver alias
is used. For example when -f elf is used
__OUTPUT_FORMAT__ must be set to elf, if
-f elf32 is used __OUTPUT_FORMAT__ must be
assigned accordingly, i.e. to elf32. The rule applies to all
output driver aliases. See section
6.5.
Fix attempts to close same file several times when -a
option is used.
Fixes for VEXTRACTF128, VMASKMOVPS encoding.
Fix missed section attribute initialization in bin output
target.
Fix arguments encoding for VPEXTRW instruction.
Remove invalid form of VPEXTRW instruction.
Add VLDDQU as alias for VLDQQU to match
specification.
Fix incorrect labels offset for VEX instructions.
Eliminate bogus warning on implicit operand size override.
%if term could not handle 64 bit numbers.
The COFF backend was limiting relocations number to 16 bits even if in real there were a way more relocations.
Print %macro name inside %rep blocks on error.
Fix preprocessor expansion behaviour. It happened sometime too early and sometime simply wrong. Move behaviour back to the origins (down to NASM 2.05.01).
Fix uninitialized data dereference on OMF output format.
Issue warning on unterminated %{ construct.
Fix for documentation typo.
Fix reversed tokens when %deftok produces more than one
output token.
Fix segmentation fault on disassembling some VEX instructions.
Missing %endif did not always cause error.
Fix typo in documentation.
Compound context local preprocessor single line macro identifiers were not expanded early enough and as result lead to unresolved symbols.
Fix NULL dereference on missed %deftok second parameter.
Fix NULL dereference on invalid %substr parameters.
Fixed assignment the magnitude of %rep counter. It is
limited to 62 bits now.
Fixed NULL dereference if argument of %strlen resolves to
whitespace. For example if nonexistent macro parameter is used.
%ifenv, %elifenv, %ifnenv, and
%elifnenv directives introduced. See
section 5.7.13.
Fixed NULL dereference if environment variable is missed.
Updates of new AVX v7 Intel instructions.
PUSH imm32 is now officially documented.
Fix for encoding the LFS, LGS and LSS in 64-bit mode.
Fixes for compatibility with OpenWatcom compiler and DOS 8.3 file format limitation.
Macros parameters range expansion introduced. See section 5.6.4.
Backward compatibility on expanging of local single macros restored.
8 bit relocations for elf and bin output
formats are introduced.
Short intersegment jumps are permitted now.
An alignment more than 64 bytes are allowed for win32,
win64 output formats.
SECTALIGN directive introduced. See
section 6.15.2.
nojmp option introduced in smartalign package.
See section 7.2.
Short aliases win, elf and macho
for output formats are introduced. Each stands for win32,
elf32 and macho32 accordingly.
Faster handling of missing directives implemented.
Various small improvements in documentation.
No hang anymore if unable to open malloc.log file.
The environments without vsnprintf function are able to build nasm again.
AMD LWP instructions updated.
Tighten EA checks. We warn a user if there overflow in EA addressing.
Make -Ox the default optimization level. For the legacy
behavior, specify -O0 explicitly. See
section 2.1.24.
Environment variables read with %! or tested with
%ifenv can now contain non-identifier characters if surrounded
by quotes. See section 5.14.2.
Add a new standard macro package %use fp for floating-point
convenience macros. See section 7.3.
Fix crash under certain circumstances when using the %+
operator.
Fix the %use statement, which was broken in 2.08.
A number of enhancements/fixes in macros area.
Support for converting strings to tokens. See section 5.3.10.
Fuzzy operand size logic introduced.
Fix COFF stack overrun on too long export identifiers.
Fix Macho-O alignment bug.
Fix crashes with –fwin32 on file with many exports.
Fix stack overrun for too long [DEBUG id].
Fix incorrect sbyte usage in IMUL (hit only if optimization flag passed).
Append ending token for .stabs records in the ELF output
format.
New NSIS script which uses ModernUI and MultiUser approach.
Visual Studio 2008 NASM integration (rules file).
Warn a user if a constant is too long (and as result will be stripped).
The obsoleted pre-XOP AMD SSE5 instruction set which was never actualized was removed.
Fix stack overrun on too long error file name passed from the command line.
Bind symbols to the .text section by default (ie in case if SECTION directive was omitted) in the ELF output format.
Fix sync points array index wrapping.
A few fixes for FMA4 and XOP instruction templates.
Add AMD Lightweight Profiling (LWP) instructions.
Fix the offset for %arg in 64-bit mode.
An undefined local macro (%$) no longer matches a global
macro with the same name.
Fix NULL dereference on too long local labels.
NASM is now under the 2-clause BSD license. See section 1.1.1.
Fix the section type for the .strtab section in the
elf64 output format.
Fix the handling of COMMON directives in the
obj output format.
New ith and srec output formats; these are
variants of the bin output format which output Intel hex and
Motorola S-records, respectively. See
section 9.2 and
section 9.3.
rdf2ihx replaced with an enhanced rdf2bin,
which can output binary, COM, Intel hex or Motorola S-records.
The Windows installer now puts the NASM directory first in the
PATH of the "NASM Shell".
Revert the early expansion behavior of %+ to pre-2.06
behavior: %+ is only expanded late.
Yet another Mach-O alignment fix.
Don't delete the list file on errors. Also, include error and warning information in the list file.
Support for 64-bit Mach-O output, see section 9.9.
Fix assert failure on certain operations that involve strings with high-bit bytes.
This release is dedicated to the memory of Charles A. Crayne, long time
NASM developer as well as moderator of comp.lang.asm.x86 and
author of the book Serious Assembler. We miss you, Chuck.
Support for indirect macro expansion (%[...]). See
section 5.3.3.
%pop can now take an argument, see
section 5.10.1.
The argument to %use is no longer macro-expanded. Use
%[...] if macro expansion is desired.
Support for thread-local storage in ELF32 and ELF64. See section 9.10.4.
Fix crash on %ifmacro without an argument.
Correct the arguments to the POPCNT instruction.
Fix section alignment in the Mach-O format.