The Netwide Assembler: NASM
Previous Chapter |
Contents |
Index
The NASM 2 series supports x86-64, and is the production version of NASM
since 2007.
- 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 7.8); 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 LLVM compiler.
- Add support of Codeview version 8 (
cv8) debug
format for win32 and
win64 formats in the
COFF backend, see
section 7.5.3.
- 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
arror.
- 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 unitialized 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.25), 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
- 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 5.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 7.9.
- 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 4.11.6.
- 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 intructions.
- 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 unitialized 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
4.4.9.
- 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 4.3.4.
- Backward compatibility on expanging of local sigle 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 4.11.13.
nojmp option introduced in
smartalign package. See
section 5.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.22.
- Environment variables read with
%! or tested
with %ifenv can now contain non-identifier
characters if surrounded by quotes. See
section 4.10.2.
- Add a new standard macro package
%use fp for
floating-point convenience macros. See
section 5.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 4.1.9.
- 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.2.
- 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 7.2 and
section 7.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 7.8.
- 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 4.1.3.
%pop can now take an argument, see
section 4.7.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 7.9.4.
- Fix crash on
%ifmacro without an argument.
- Correct the arguments to the
POPCNT
instruction.
- Fix section alignment in the Mach-O format.
- Update AVX support to version 5 of the Intel specification.
- Fix the handling of accesses to context-local macros from higher levels
in the context stack.
- Treat
WAIT as a prefix rather than as an
instruction, thereby allowing constructs like
O16 FSAVE to work correctly.
- Support for structures with a non-zero base offset. See
section 4.11.10.
- Correctly handle preprocessor token concatenation (see
section 4.3.9) involving
floating-point numbers.
- The
PINSR series of instructions have been
corrected and rationalized.
- Removed AMD SSE5, replaced with the new XOP/FMA4/CVT16 (rev 3.03) spec.
- The ELF backends no longer automatically generate a
.comment section.
- Add additional "well-known" ELF sections with default attributes. See
section 7.9.2.
- Fix the
-w/-W
option parsing, which was broken in NASM 2.05.
- Fix redundant REX.W prefix on
JMP reg64.
- Make the behaviour of
-O0 match NASM 0.98
legacy behavior. See section
2.1.22.
-w-user can be used to suppress the output of
%warning directives. See
section 2.1.24.
- Fix bug where
ALIGN would issue a full
alignment datum instead of zero bytes.
- Fix offsets in list files.
- Fix
%include inside multi-line macros or
loops.
- Fix error where NASM would generate a spurious warning on valid
optimizations of immediate values.
- Fix arguments to a number of the
CVT SSE
instructions.
- Fix RIP-relative offsets when the instruction carries an immediate.
- Massive overhaul of the ELF64 backend for spec compliance.
- Fix the Geode
PFRCPV and
PFRSQRTV instruction.
- Fix the SSE 4.2
CRC32 instruction.
- Sanitize macro handing in the
%error
directive.
- New
%warning directive to issue
user-controlled warnings.
%error directives are now deferred to the
final assembly phase.
- New
%fatal directive to immediately terminate
assembly.
- New
%strcat directive to join quoted strings
together.
- New
%use macro directive to support standard
macro directives. See section
4.6.4.
- Excess default parameters to
%macro now
issues a warning by default. See
section 4.3.
- Fix
%ifn and
%elifn.
- Fix nested
%else clauses.
- Correct the handling of nested
%reps.
- New
%unmacro directive to undeclare a
multi-line macro. See section
4.3.12.
- Builtin macro
__PASS__ which expands to the
current assembly pass. See section
4.11.9.
__utf16__ and
__utf32__ operators to generate UTF-16 and UTF-32
strings. See section 3.4.5.
- Fix bug in case-insensitive matching when compiled on platforms that
don't use the
configure script. Of the official
release binaries, that only affected the OS/2 binary.
- Support for x87 packed BCD constants. See
section 3.4.7.
- Correct the
LTR and
SLDT instructions in 64-bit mode.
- Fix unnecessary REX.W prefix on indirect jumps in 64-bit mode.
- Add AVX versions of the AES instructions
(
VAES...).
- Fix the 256-bit FMA instructions.
- Add 256-bit AVX stores per the latest AVX spec.
- VIA XCRYPT instructions can now be written either with or without
REP, apparently different versions of the VIA
spec wrote them differently.
- Add missing 64-bit
MOVNTI instruction.
- Fix the operand size of
VMREAD and
VMWRITE.
- Numerous bug fixes, especially to the AES, AVX and VTX instructions.
- The optimizer now always runs until it converges. It also runs even
when disabled, but doesn't optimize. This allows most forward references to
be resolved properly.
%push no longer needs a context identifier;
omitting the context identifier results in an anonymous context.
- Fix buffer overflow in the listing module.
- Fix the handling of hexadecimal escape codes in `...` strings.
- The Postscript/PDF documentation has been reformatted.
- The
-F option now implies
-g.
- Add support for Intel AVX, CLMUL and FMA instructions, including YMM
registers.
dy, resy and
yword for 32-byte operands.
- Fix some SSE5 instructions.
- Intel
INVEPT,
INVVPID and MOVBE
instructions.
- Fix checking for critical expressions when the optimizer is enabled.
- Support the DWARF debugging format for ELF targets.
- Fix optimizations of signed bytes.
- Fix operation on bigendian machines.
- Fix buffer overflow in the preprocessor.
SAFESEH support for Win32,
IMAGEREL for Win64 (SEH).
%? and %?? to refer
to the name of a macro itself. In particular,
%idefine keyword $%? can be used to make a
keyword "disappear".
- New options for dependency generation:
-MD,
-MF, -MP,
-MT, -MQ.
- New preprocessor directives
%pathsearch and
%depend; INCBIN reimplemented as a macro.
%include now resolves macros in a sane
manner.
%substr can now be used to get other than
one-character substrings.
- New type of character/string constants, using backquotes
(
`...`), which support C-style escape sequences.
%defstr and
%idefstr to stringize macro definitions before
creation.
- Fix forward references used in
EQU
statements.
- Additional fixes for MMX operands with explicit
qword, as well as (hopefully) SSE operands with
oword.
- Fix handling of truncated strings with
DO.
- Fix segfaults due to memory overwrites when floating-point constants
were used.
- Fix segfaults due to missing include files.
- Fix OpenWatcom Makefiles for DOS and OS/2.
- Add autogenerated instruction list back into the documentation.
- ELF: Fix segfault when generating stabs, and no symbols have been
defined.
- ELF: Experimental support for DWARF debugging information.
- New compile date and time standard macros.
%ifnum now returns true for negative numbers.
- New
%iftoken test for a single token.
- New
%ifempty test for empty expansion.
- Add support for the
XSAVE instruction group.
- Makefile for Netware/gcc.
- Fix issue with some warnings getting emitted way too many times.
- Autogenerated instruction list added to the documentation.
- Fix the handling of MMX registers with explicit
qword tags on memory (broken in 2.00 due to
64-bit changes.)
- Fix the PREFETCH instructions.
- Fix the documentation.
- Fix debugging info when using
-f elf
(backwards compatibility alias for -f elf32).
- Man pages for rdoff tools (from the Debian project.)
- ELF: handle large numbers of sections.
- Fix corrupt output when the optimizer runs out of passes.
- Added c99 data-type compliance.
- Added general x86-64 support.
- Added win64 (x86-64 COFF) output format.
- Added
__BITS__ standard macro.
- Renamed the
elf output format to
elf32 for clarity.
- Added
elf64 and
macho (MacOS X) output formats.
- Added Numeric constants in
dq directive.
- Added
oword, do and
reso pseudo operands.
- Allow underscores in numbers.
- Added 8-, 16- and 128-bit floating-point formats.
- Added binary, octal and hexadecimal floating-point.
- Correct the generation of floating-point constants.
- Added floating-point option control.
- Added Infinity and NaN floating point support.
- Added ELF Symbol Visibility support.
- Added setting OSABI value in ELF header directive.
- Added Generate Makefile Dependencies option.
- Added Unlimited Optimization Passes option.
- Added
%IFN and
%ELIFN support.
- Added Logical Negation Operator.
- Enhanced Stack Relative Preprocessor Directives.
- Enhanced ELF Debug Formats.
- Enhanced Send Errors to a File option.
- Added SSSE3, SSE4.1, SSE4.2, SSE5 support.
- Added a large number of additional instructions.
- Significant performance improvements.
-w+warning and
-w-warning can now be written as -Wwarning and
-Wno-warning, respectively. See
section 2.1.24.
- Add
-w+error to treat warnings as errors. See
section 2.1.24.
- Add
-w+all and
-w-all to enable or disable all suppressible
warnings. See section 2.1.24.
The 0.98 series was the production versions of NASM from 1999 to 2007.
- fix buffer overflow
- fix outas86's
.bss handling
- "make spotless" no longer deletes config.h.in.
%(el)if(n)idn insensitivity to string quotes
difference (#809300).
- (nasm.c)
__OUTPUT_FORMAT__ changed to string
value instead of symbol.
- Add Makefile for 16-bit DOS binaries under OpenWatcom, and modify
mkdep.pl to be able to generate completely
pathless dependencies, as required by OpenWatcom wmake (it supports path
searches, but not explicit paths.)
- Fix the
STR instruction.
- Fix the ELF output format, which was broken under certain circumstances
due to the addition of stabs support.
- Quick-fix Borland format debug-info for
-f obj
- Fix for
%rep with no arguments (#560568)
- Fix concatenation of preprocessor function call (#794686)
- Fix long label causes coredump (#677841)
- Use autoheader as well as autoconf to keep configure from generating
ridiculously long command lines.
- Make sure that all of the formats which support debugging output
actually will suppress debugging output when
-g
not specified.
- Paths given in
-I switch searched for
incbin-ed as well as
%include-ed files.
- Added stabs debugging for the ELF output format, patch from Martin
Wawro.
- Fix
output/outbin.c to allow origin >
80000000h.
- Make
-U switch work.
- Fix the use of relative offsets with explicit prefixes, e.g.
a32 loop foo.
- Remove
backslash().
- Fix the
SMSW and
SLDT instructions.
-O2 and -O3 are no
longer aliases for -O10 and
-O15. If you mean the latter, please say so! :)
- Update rdoff - librarian/archiver - common rec - docs!
- Fix signed/unsigned problems.
- Fix
JMP FAR label and
CALL FAR label.
- Add new multisection support - map files - fix align bug
- Fix sysexit, movhps/movlps reg,reg bugs in insns.dat
Q or O suffixes
indicate octal
- Support Prescott new instructions (PNI).
- Cyrix
XSTORE instruction.
- Fix build failure on 16-bit DOS (Makefile.bc3 workaround for compiler
bug.)
- Fix dependencies and compiler warnings.
- Add "const" in a number of places.
- Add -X option to specify error reporting format (use -Xvc to integrate
with Microsoft Visual Studio.)
- Minor changes for code legibility.
- Drop use of tmpnam() in rdoff (security fix.)
- Correct additional address-size vs. operand-size confusions.
- Generate dependencies for all Makefiles automatically.
- Add support for unimplemented (but theoretically available) registers
such as tr0 and cr5. Segment registers 6 and 7 are called segr6 and segr7
for the operations which they can be represented.
- Correct some disassembler bugs related to redundant address-size
prefixes. Some work still remains in this area.
- Correctly generate an error for things like "SEG eax".
- Add the JMPE instruction, enabled by "CPU IA64".
- Correct compilation on newer gcc/glibc platforms.
- Issue an error on things like "jmp far eax".
- New __NASM_PATCHLEVEL__ and __NASM_VERSION_ID__ standard macros to
round out the version-query macros. version.pl now understands X.YYplWW or
X.YY.ZZplWW as a version number, equivalent to X.YY.ZZ.WW (or X.YY.0.WW, as
appropriate).
- New keyword "strict" to disable the optimization of specific operands.
- Fix the handing of size overrides with JMP instructions (instructions
such as "jmp dword foo".)
- Fix the handling of "ABSOLUTE label", where "label" points into a
relocatable segment.
- Fix OBJ output format with lots of externs.
- More documentation updates.
- Add -Ov option to get verbose information about optimizations.
- Undo a braindead change which broke
%elif
directives.
- Makefile updates.
- Fix NASM crashing when
%macro directives were
left unterminated.
- Lots of documentation updates.
- Complete rewrite of the PostScript/PDF documentation generator.
- The MS Visual C++ Makefile was updated and corrected.
- Recognize .rodata as a standard section name in ELF.
- Fix some obsolete Perl4-isms in Perl scripts.
- Fix configure.in to work with autoconf 2.5x.
- Fix a couple of "make cleaner" misses.
- Make the normal "./configure && make" work with Cygwin.
- Correctly build in a separate object directory again.
- Derive all references to the version number from the version file.
- New standard macros __NASM_SUBMINOR__ and __NASM_VER__ macros.
- Lots of Makefile updates and bug fixes.
- New
%ifmacro directive to test for multiline
macros.
- Documentation updates.
- Fixes for 16-bit OBJ format output.
- Changed the NASM environment variable to NASMENV.
- Changed doc files a lot: completely removed old READMExx and Wishlist
files, incorporating all information in CHANGES and TODO.
- I waited a long time to rename zoutieee.c to (original) outieee.c
- moved all output modules to output/ subdirectory.
- Added 'make strip' target to strip debug info from nasm & ndisasm.
- Added INSTALL file with installation instructions.
- Added -v option description to nasm man.
- Added dist makefile target to produce source distributions.
- 16-bit support for ELF output format (GNU extension, but useful.)
- Fastcooked this for Debian's Woody release: Frank applied the INCBIN
bug patch to 0.98.25alt and called it 0.98.28 to not confuse poor little
apt-get.
- Reorganised files even better from 0.98.25alt
- Prettified the source tree. Moved files to more reasonable places.
- Added findleak.pl script to misc/ directory.
- Attempted to fix doc.
- Line continuation character
\.
- Docs inadvertantly reverted - "dos packaging".
- FIXME: Someone, document this please.
- Documentation - Ndisasm doc added to Nasm.doc.
- Attempted to remove rdoff version1
- Lino Mastrodomenico's patches to preproc.c (%$$ bug?).
- Update rdoff2 - attempt to remove v1.
- H. J. Lu's patch back out.
- Added ".rdata" to "-f win32".
- H. J. Lu's "bogus elf" patch. (Red Hat problem?)
- Fix whitespace before "[section ..." bug.
- Rdoff changes (?).
- Fix fixes to memory leaks.
- Update optimization (new function of "-O1")
- Changes to test/bintest.asm (?).
- Optimization changes.
- Ndisasm fixed.
- Add multiple sections support to "-f bin".
- Changed GLOBAL_TEMP_BASE in outelf.c from 6 to 15.
- Add "-v" as an alias to the "-r" switch.
- Remove "#ifdef" from Tasm compatibility options.
- Remove redundant size-overrides on "mov ds, ex", etc.
- Fixes to SSE2, other insns.dat (?).
- Enable uppercase "I" and "P" switches.
- Case insinsitive "seg" and "wrt".
- Update install.sh (?).
- Allocate tokens in blocks.
- Improve "invalid effective address" messages.
- Add "
%strlen" and
"%substr" macro operators
- Fixed broken c16.mac.
- Unterminated string error reported.
- Fixed bugs as per 0.98bf
Changes from 0.98.07 release to 98.09b as of 28-Oct-2001
- More closely compatible with 0.98 when -O0 is implied or specified. Not
strictly identical, since backward branches in range of short offsets are
recognized, and signed byte values with no explicit size specification will
be assembled as a single byte.
- More forgiving with the PUSH instruction. 0.98 requires a size to be
specified always. 0.98.09b will imply the size from the current BITS
setting (16 or 32).
- Changed definition of the optimization flag:
-O0 strict two-pass assembly, JMP and Jcc are handled more like 0.98,
except that back- ward JMPs are short, if possible.
-O1 strict two-pass assembly, but forward branches are assembled with
code guaranteed to reach; may produce larger code than -O0, but will
produce successful assembly more often if branch offset sizes are not
specified.
-O2 multi-pass optimization, minimize branch offsets; also will minimize
signed immed- iate bytes, overriding size specification.
-O3 like -O2, but more passes taken, if needed
- Added Stepane Denis' SSE2 instructions to a *working* version of the
code - some earlier versions were based on broken code - sorry 'bout that.
version "0.98.07"
01/28/01
- Cosmetic modifications to nasm.c, nasm.h, AUTHORS, MODIFIED
- - Add "metalbrain"s jecxz bug fix in insns.dat - alter nasmdoc.src to
match - version "0.98.06f"
- Removed the "outforms.h" file - it appears to be someone's old backup
of "outform.h". version "0.98.06e"
01/09/01
- fbk - finally added the fix for the "multiple %includes bug", known
since 7/27/99 - reported originally (?) and sent to us by Austin Lunnen -
he reports that John Fine had a fix within the day. Here it is...
- Nelson Rush resigns from the group. Big thanks to Nelson for his
leadership and enthusiasm in getting these changes incorporated into Nasm!
- fbk - [list +], [list -] directives - ineptly implemented, should be
re-written or removed, perhaps.
- Brian Raiter / fbk - "elfso bug" fix - applied to aoutb format as well
- testing might be desirable...
08/07/00
- James Seter - -postfix, -prefix command line switches.
- Yuri Zaporozhets - rdoff utility changes.
- GAS-like palign (Panos Minos)
- FIXME: Someone, fill this in with details
- Fixed - elf and aoutb bug - shared libraries - multiple "%include" bug
in "-f obj" - jcxz, jecxz bug - unrecognized option bug in ndisasm
- Added signed byte optimizations for the 0x81/0x83 class of
instructions: ADC, ADD, AND, CMP, OR, SBB, SUB, XOR: when used as 'ADD
reg16,imm' or 'ADD reg32,imm.' Also optimization of signed byte form of
'PUSH imm' and 'IMUL reg,imm'/'IMUL reg,reg,imm.' No size specification is
needed.
- Added multi-pass JMP and Jcc offset optimization. Offsets on forward
references will preferentially use the short form, without the need to code
a specific size (short or near) for the branch. Added instructions for 'Jcc
label' to use the form 'Jnotcc $+3/JMP label', in cases where a short
offset is out of bounds. If compiling for a 386 or higher CPU, then the 386
form of Jcc will be used instead.
This feature is controlled by a new command-line switch: "O", (upper
case letter O). "-O0" reverts the assembler to no extra optimization
passes, "-O1" allows up to 5 extra passes, and "-O2"(default), allows up to
10 extra optimization passes.
- Added a new directive: 'cpu XXX', where XXX is any of: 8086, 186, 286,
386, 486, 586, pentium, 686, PPro, P2, P3 or Katmai. All are case
insensitive. All instructions will be selected only if they apply to the
selected cpu or lower. Corrected a couple of bugs in cpu-dependence in
'insns.dat'.
- Added to 'standard.mac', the "use16" and "use32" forms of the "bits
16/32" directive. This is nothing new, just conforms to a lot of other
assemblers. (minor)
- Changed label allocation from 320/32 (10000 labels @ 200K+) to 32/37
(1000 labels); makes running under DOS much easier. Since additional label
space is allocated dynamically, this should have no effect on large
programs with lots of labels. The 37 is a prime, believed to be better for
hashing. (minor)
"Integrated patchfile 0.98-0.98.01. I call this version 0.98.03 for
historical reasons: 0.98.02 was trashed." --John Coffman
<johninsd@san.rr.com>, 27-Jul-2000
- Kendall Bennett's SciTech MGL changes
- Note that you must define "TASM_COMPAT" at compile-time to get the Tasm
Ideal Mode compatibility.
- All changes can be compiled in and out using the TASM_COMPAT macros,
and when compiled without TASM_COMPAT defined we get the exact same binary
as the unmodified 0.98 sources.
- standard.mac, macros.c: Added macros to ignore TASM directives before
first include
- nasm.h: Added extern declaration for tasm_compatible_mode
- nasm.c: Added global variable tasm_compatible_mode
- Added command line switch for TASM compatible mode (-t)
- Changed version command line to reflect when compiled with TASM
additions
- Added response file processing to allow all arguments on a single line
(response file is @resp rather than -@resp for NASM format).
- labels.c: Changes islocal() macro to support TASM style @@local labels.
- Added islocalchar() macro to support TASM style @@local labels.
- parser.c: Added support for TASM style memory references (ie: mov
[DWORD eax],10 rather than the NASM style mov DWORD [eax],10).
- preproc.c: Added new directives,
%arg,
%local, %stacksize to
directives table
- Added support for TASM style directives without a leading % symbol.
- Integrated a block of changes from Andrew Zabolotny
<bit@eltech.ru>:
- A new keyword
%xdefine and its
case-insensitive counterpart %ixdefine. They work
almost the same way as %define and
%idefine but expand the definition immediately,
not on the invocation. Something like a cross between
%define and %assign.
The "x" suffix stands for "eXpand", so "xdefine" can be deciphered as
"expand-and-define". Thus you can do things like this:
%assign ofs 0
%macro arg 1
%xdefine %1 dword [esp+ofs]
%assign ofs ofs+4
%endmacro
- Changed the place where the expansion of %$name macros are expanded.
Now they are converted into ..@ctxnum.name form when detokenizing, so there
are no quirks as before when using %$name arguments to macros, in macros
etc. For example:
%macro abc 1
%define %1 hello
%endm
abc %$here
%$here
Now last line will be expanded into "hello" as expected. This also
allows for lots of goodies, a good example are extended "proc" macros
included in this archive.
- Added a check for "cstk" in smacro_defined() before calling get_ctx() -
this allows for things like:
%ifdef %$abc
%endif
to work without warnings even in no context.
- Added a check for "cstk" in %if*ctx and %elif*ctx directives - this
allows to use
%ifctx w