H. Peter Anvin [Tue, 22 Jan 2008 00:26:32 +0000 (16:26 -0800)]
misc/findleak.pl: make executable
misc/findleak.pl: no text change, but mark file executable.
H. Peter Anvin [Tue, 22 Jan 2008 00:26:05 +0000 (16:26 -0800)]
nasm.h: make t_type an enum
Make t_type an enum to make debugging easier.
H. Peter Anvin [Tue, 22 Jan 2008 00:23:59 +0000 (16:23 -0800)]
nasm.c: clean up the handing of response files
Avoid using malloc/free (not nasm_malloc/nasm_free even) in the
processing of response files; move to separate function.
H. Peter Anvin [Tue, 22 Jan 2008 00:19:52 +0000 (16:19 -0800)]
float.c: fix memory overwrite with 8-, 16- or 80-bit constants
We incorrectly clobbered 4 extra bytes when serializing 8-, 16- or
80-bit constants. Be less smart, but actually correct.
H. Peter Anvin [Tue, 22 Jan 2008 00:18:44 +0000 (16:18 -0800)]
OpenWatcom makefiles: add DEBUG option
Add a Makefile variable, DEBUG, which can be used to set debug options
(-d2, -DLOGALLOC, etc.)
H. Peter Anvin [Mon, 21 Jan 2008 19:50:31 +0000 (11:50 -0800)]
Fix the options when compiling under OpenWatcom
OpenWatcom needs different strings for compile and link target, so
using -bcl which uses the same string for both is just plain wrong.
This fixes that bit, but running nasm on test/floatx.asm (at least as
a DOS or a Win32 binary) crashes with a NULL pointer reference inside
the C library free() function.
H. Peter Anvin [Mon, 21 Jan 2008 05:50:02 +0000 (21:50 -0800)]
doc/Makefile.in: avoid deleting opt_var.txt, fix dependencies
Fix dependencies in the generation of the instruction list, and make
sure we don't delete opt_var.txt on "make spotless".
Charles Crayne [Mon, 21 Jan 2008 00:27:03 +0000 (16:27 -0800)]
Add autogenerated instruction list to NASM documentation
1. Allow included files in rdsrc.pl
2. New program inslist.pl to generate instruction list from insns.dat
3. Mark certain comments in insns.dat as documentation subheaders
4. Add Instruction List appendix to nasmdoc.src
5. Update build process to invoke inslist.pl
H. Peter Anvin [Thu, 17 Jan 2008 20:12:05 +0000 (15:12 -0500)]
NASM 2.01
H. Peter Anvin [Thu, 17 Jan 2008 20:11:46 +0000 (15:11 -0500)]
Document change in ELF section limit
Charles Crayne [Thu, 17 Jan 2008 02:41:03 +0000 (18:41 -0800)]
Merge branch 'master' of git+ssh://ccrayne@repo.or.cz/srv/git/nasm
Charles Crayne [Thu, 17 Jan 2008 02:38:48 +0000 (18:38 -0800)]
Increase GLOBAL_TEMP_BASE
Increase GLOBAL_TEMP_BASE from 4096 to 1048576
H. Peter Anvin [Sun, 13 Jan 2008 19:46:04 +0000 (11:46 -0800)]
Remove debugging printf
Remove debugging printf which shouldn't ever have been checked in ;)
Charles Crayne [Sat, 12 Jan 2008 01:22:19 +0000 (17:22 -0800)]
Temporary fix for large number of sections
Increase GLOBAL_TEMP_BASE TO 4096
H. Peter Anvin [Wed, 9 Jan 2008 07:07:50 +0000 (23:07 -0800)]
NASM 2.01rc2
H. Peter Anvin [Wed, 9 Jan 2008 07:03:57 +0000 (23:03 -0800)]
Sanitize the pass logic, and only issue PASS1 warnings on pass0 == 1
For PASS1 warnings, only do them when pass0 == 1. The prior passes
are to be considered training passes. This is a bit awkward if we
then hit an error, but it's better than n repeated warnings.
H. Peter Anvin [Wed, 9 Jan 2008 06:31:20 +0000 (22:31 -0800)]
Remove magic "five pass minimum" - I'm pretty sure optimizer is fixed.
The five-pass-minimum was a hack for a bug which I think is identified
now. Doesn't really change the fact that if you want the optimizer,
you probably want -Ox.
H. Peter Anvin [Wed, 9 Jan 2008 06:29:21 +0000 (22:29 -0800)]
Optimizer: force progression through final passes when hitting limit
We have a number of bug reports about things not working properly when
the optimizer is running out of passes. I suspect the reason is
simply that we don't properly execute the final passes (pass0 = 1, 2)
when hitting the limit. Make sure we advance pass0 the last few
times.
H. Peter Anvin [Wed, 9 Jan 2008 06:13:48 +0000 (22:13 -0800)]
BR 1864243: better warnings for out-of-range constants
In particular, we'd miss issuing warnings for out-of-range dword
values, and the message for constants too large (we can't deal with >
64 bits) said 32 bits, not 64.
H. Peter Anvin [Wed, 2 Jan 2008 20:19:41 +0000 (12:19 -0800)]
disasm: relative operands are signed, not unsigned
Relative operands are signed, not unsigned; record them as such and
then apply proper truncation after offset addition.
Charles Crayne [Sun, 30 Dec 2007 22:24:10 +0000 (14:24 -0800)]
Define MKDIR for rdoff make file
Addition of rdoff man pages uses MKDIR, which was not defined
Beroset [Sat, 29 Dec 2007 14:44:23 +0000 (09:44 -0500)]
regularized spelling of license to match name of LICENSE file
Charles Crayne [Fri, 28 Dec 2007 23:00:03 +0000 (15:00 -0800)]
Check in Ed Beroset's documentation fix
Correct count in %strlen example
H. Peter Anvin [Thu, 27 Dec 2007 03:10:20 +0000 (19:10 -0800)]
disasm: 32-bit index registers were displayed as 64 bits
Fix bug where 32-bit index registers got incorrectly displayed as 64
bits:
00000000 678B040B mov eax,[ebx+rcx]
00000004 678B044B mov eax,[ebx+rcx*2]
00000008 678B045B mov eax,[ebx+rbx*2]
H. Peter Anvin [Wed, 26 Dec 2007 18:18:49 +0000 (10:18 -0800)]
More changes for 2.01
H. Peter Anvin [Wed, 26 Dec 2007 18:18:01 +0000 (10:18 -0800)]
specfile: correctly handle compressed manpages
H. Peter Anvin [Tue, 25 Dec 2007 23:38:41 +0000 (15:38 -0800)]
NASM 2.01rc1
H. Peter Anvin [Tue, 25 Dec 2007 23:38:22 +0000 (15:38 -0800)]
Document "-f elf" fix.
H. Peter Anvin [Tue, 25 Dec 2007 23:31:27 +0000 (15:31 -0800)]
Update CHANGES for an upcoming 2.01 release.
H. Peter Anvin [Tue, 25 Dec 2007 23:07:39 +0000 (15:07 -0800)]
Remove bogus duplicates of the PREFETCH* instructions
H. Peter Anvin [Tue, 25 Dec 2007 23:18:12 +0000 (15:18 -0800)]
(Hopefully) fix the handing of MMX instructions with prefixes
Mark MMX instructions with \323 (do not add REX.W) unless they involve
the integer instruction file.
Change SM -> SQ for MMX instructions.
Something not complete attached, so my understanding is
mmxreg,mmxrm needs SQ
Something like xmmreg,reg32 needs SD
xmmreg,xmmrm needs SO
H. Peter Anvin [Thu, 20 Dec 2007 20:24:17 +0000 (12:24 -0800)]
ndisasm: handle instructions at offset zero
Correctly handle instructions at offset zero
H. Peter Anvin [Wed, 19 Dec 2007 00:13:47 +0000 (16:13 -0800)]
Add RDOFF man pages to specfile.
H. Peter Anvin [Wed, 19 Dec 2007 00:12:13 +0000 (16:12 -0800)]
rdoff: add man pages from the Debian project.
Add man pages for some of the rdoff programs, from the Debian project.
H. Peter Anvin [Mon, 10 Dec 2007 23:36:39 +0000 (15:36 -0800)]
Complete the altreg set with "r0h".."r3h".
H. Peter Anvin [Mon, 10 Dec 2007 23:35:50 +0000 (15:35 -0800)]
Merge branch 'master' of git+ssh://repo.or.cz/srv/git/nasm
H. Peter Anvin [Mon, 10 Dec 2007 23:35:28 +0000 (15:35 -0800)]
Document naming of registers in 64-bit mode
Intel's docs diverge from AMD's docs (MASM follow AMD's docs);
formally document what we're doing and include a file of macros in
case someone wants to use alternate names.
Charles Crayne [Sat, 1 Dec 2007 00:23:56 +0000 (16:23 -0800)]
Fix elf vs elf32 stabs generation bug
When invoked as -f elf -g, stabs info was not being generated.
H. Peter Anvin [Fri, 30 Nov 2007 01:30:11 +0000 (17:30 -0800)]
Refer to version 2.00 consistently as 2.00 not 2.0
H. Peter Anvin [Fri, 30 Nov 2007 01:29:37 +0000 (17:29 -0800)]
doc: 16- and 128-bit floating point were also new for 2.0
H. Peter Anvin [Fri, 30 Nov 2007 01:28:05 +0000 (17:28 -0800)]
Update install instructions; remove references to nasmw.exe
H. Peter Anvin [Fri, 30 Nov 2007 01:20:45 +0000 (17:20 -0800)]
doc: s/NASM/nasm/ in invocation example
On case-sensitive systems, "NASM" doesn't work.
H. Peter Anvin [Fri, 30 Nov 2007 01:19:49 +0000 (17:19 -0800)]
-o is output filename, not output format
H. Peter Anvin [Fri, 30 Nov 2007 01:17:35 +0000 (17:17 -0800)]
Give an example on how Unix and Win64 count argument differently
H. Peter Anvin [Fri, 30 Nov 2007 01:10:04 +0000 (17:10 -0800)]
Allow numbers to be sorted separately from letters
Allow numbers to be sorted separately from letters.
H. Peter Anvin [Fri, 30 Nov 2007 01:07:53 +0000 (17:07 -0800)]
nasmdoc.src: editorial changes
H. Peter Anvin [Fri, 30 Nov 2007 01:05:55 +0000 (17:05 -0800)]
CHANGES that were missed...
H. Peter Anvin [Thu, 29 Nov 2007 22:51:47 +0000 (14:51 -0800)]
Update COPYING file with the latest edition of LGPL 2.1
Not a new license, just editorial changes like the FSF address
changed.
H. Peter Anvin [Thu, 29 Nov 2007 21:10:08 +0000 (13:10 -0800)]
%ixdefine, not %xidefine
The docs had %xidefine, the code has %ixdefine. The code wins.
H. Peter Anvin [Wed, 28 Nov 2007 21:14:43 +0000 (13:14 -0800)]
NASM 2.00
H. Peter Anvin [Wed, 28 Nov 2007 18:46:15 +0000 (10:46 -0800)]
Add macho support to CHANGES
H. Peter Anvin [Wed, 28 Nov 2007 18:41:55 +0000 (10:41 -0800)]
Add OS/2 build instructions since our binaries don't work.
H. Peter Anvin [Tue, 27 Nov 2007 06:02:21 +0000 (22:02 -0800)]
BR 852464: Fix memory leak in %if/%elseif
H. Peter Anvin [Tue, 27 Nov 2007 05:43:55 +0000 (21:43 -0800)]
Additional CHANGES
Charles Crayne [Sun, 25 Nov 2007 22:25:13 +0000 (14:25 -0800)]
Documention Changes for Release 2.00
modified: CHANGES
modified: ChangeLog
modified: doc/nasmdoc.src
H. Peter Anvin [Sun, 25 Nov 2007 00:31:48 +0000 (16:31 -0800)]
Typo fixes in documentation
Typo fixes in documentation, including BR 1836379
H. Peter Anvin [Wed, 21 Nov 2007 07:37:46 +0000 (23:37 -0800)]
NASM 2.00rc3
H. Peter Anvin [Wed, 21 Nov 2007 05:45:16 +0000 (21:45 -0800)]
Unbreak CMPSW/CMPSD/CMPSQ
The CMPSW/CMPSD/CMPSQ instructions were broken by checkin
a30cc07224154c101c1275c148bf60d3acd43015 due to an incorrect removal
of \1 (should only have been removed after \144-147 and \154-157). I
have verified that no other instructions were affected.
H. Peter Anvin [Tue, 20 Nov 2007 21:23:34 +0000 (13:23 -0800)]
Merge branch 'master' of git+ssh://repo.or.cz/srv/git/nasm
H. Peter Anvin [Tue, 20 Nov 2007 21:22:58 +0000 (13:22 -0800)]
ndisasm: handle the case of "no more sync points"
Handle the case of "no more sync points" explicitly, instead of saying
the next sync point is at UINT32_MAX.
H. Peter Anvin [Tue, 20 Nov 2007 07:09:31 +0000 (23:09 -0800)]
NASM 2.00rc2
H. Peter Anvin [Tue, 20 Nov 2007 07:09:24 +0000 (23:09 -0800)]
tag-release: a simple script to tag the repository for release
H. Peter Anvin [Mon, 19 Nov 2007 21:14:59 +0000 (13:14 -0800)]
Slightly faster implementation of the deadman counter
Count down to zero instead of up to a constant...
H. Peter Anvin [Mon, 19 Nov 2007 20:26:50 +0000 (12:26 -0800)]
BR 812417: Deadman counter for macro expansion
Per BR 812417, certain macro expansions can hang NASM. Allow a
deadman counter (currently set to 2^20) to fail out if it gets
ridiculous.
H. Peter Anvin [Mon, 19 Nov 2007 20:02:38 +0000 (12:02 -0800)]
BR 877583: Fix RAA memory leak
raa_free() didn't actually do the proper job; it would only free leaf
nodes, not internal nodes.
H. Peter Anvin [Mon, 19 Nov 2007 19:53:18 +0000 (11:53 -0800)]
BR 863173: Fix offsets of TIMES/INCBIN in list file
Correct the emission of offsets for TIMES/INCBIN in the list file.
H. Peter Anvin [Mon, 19 Nov 2007 19:45:40 +0000 (11:45 -0800)]
BR 1834731: Remove redundant error messages for no input file
Avoid redundant error messages:
./nasm
nasm: error: no input file specified
nasm: fatal: file `' is both input and output file
type `nasm -h' for help
... which is more than a wee bit confusing to the user.
H. Peter Anvin [Mon, 19 Nov 2007 19:44:05 +0000 (11:44 -0800)]
insns.pl: remove debugging output
Remove debugging output which was never meant to be checked in.
H. Peter Anvin [Mon, 19 Nov 2007 06:18:09 +0000 (22:18 -0800)]
Clean up remaining build warnings
Clean up remaining build warnings. None of this should affect code
operations. The only warnings which were actually relevant might have
been the ones in ldrdf.c, but it's not clear if anyone ever uses that.
H. Peter Anvin [Mon, 19 Nov 2007 05:55:26 +0000 (21:55 -0800)]
BR 1834292: Fix multiple disassembler bugs
- Correct the building on the disassembler decision tree.
- Handle SSE instructions with F2 prefix (\332) correctly.
- Mark instructions which are now used as prefixes with ND.
(In a future version when we have better CPU version handling,
we should probably build the decision tree at runtime based on
the selected CPU feature sets.)
- Sanitize the handling of \144-147 and \154-157 in both the assembler
and disassembler. They take an opcode byte as argument; don't
pretend they don't.
H. Peter Anvin [Sun, 18 Nov 2007 20:01:05 +0000 (12:01 -0800)]
BR 1834056: Remove warnings in rdoff/rdoff.c
Remove warnings, especially the alias warnings in rdoff/rdoff.c.
H. Peter Anvin [Sun, 18 Nov 2007 19:55:10 +0000 (11:55 -0800)]
BR 1091926: Bounds checking for command line parsing
Avoid failure if the command line has doctored arguments.
H. Peter Anvin [Sun, 18 Nov 2007 05:21:18 +0000 (21:21 -0800)]
Remove FIXME from documentation
This better work now, we're in release candidate mode.
Charles Crayne [Sun, 18 Nov 2007 05:08:33 +0000 (21:08 -0800)]
Check in Keith's Fixes
1. Don't warn on 32-bit overflow
2. Change EM64T to Intel 64 in Defining CPU Dependencies
section of documentation.
H. Peter Anvin [Sat, 17 Nov 2007 22:35:19 +0000 (14:35 -0800)]
Make the definition for float_const() match the prototype
The definition for float_const() had int32_t, the prototype had only
int. We only care about the sign, so int makes more sense.
H. Peter Anvin [Fri, 16 Nov 2007 08:03:02 +0000 (00:03 -0800)]
NASM 2.00rc1
H. Peter Anvin [Fri, 16 Nov 2007 01:12:29 +0000 (17:12 -0800)]
Clean up the command-line parsing; make -w/-W match others
Clean up the command-line parsing and make -w/-W match the behaviour
of all the other options with regards to arguments.
H. Peter Anvin [Thu, 15 Nov 2007 22:38:19 +0000 (14:38 -0800)]
BR 993895: Support zero-operand floating-point insn
Support the zero-operand form of floating-point instructions. Note
that in most cases, the form generated is actually the "popping" form,
e.g. "FADD" becomes "FADDP st0,st1". This is in accordance with the
Intel documentation. "FADDP" is also supported.
H. Peter Anvin [Thu, 15 Nov 2007 18:25:52 +0000 (10:25 -0800)]
Remove some vestiges of "native" RESW/RESD support
We now internally convert all RESx opcodes to RESB, so we don't need
support for that in the assembler.
H. Peter Anvin [Thu, 15 Nov 2007 18:24:55 +0000 (10:24 -0800)]
outbin.c: fix one missed change from type -> size
Fix one missed change from "type" to "size". May want to look through
all the other backends as well for similar issues.
This would generate the wrong section lengths, with obviously bad results.
root [Wed, 14 Nov 2007 03:52:54 +0000 (19:52 -0800)]
Support setting OSABI value in ELF header.
H. Peter Anvin [Tue, 13 Nov 2007 19:34:34 +0000 (11:34 -0800)]
Enable a few warnings by default; clean up warning descriptions
H. Peter Anvin [Tue, 13 Nov 2007 19:31:15 +0000 (11:31 -0800)]
Add gcc-style -W/-Wno- warning selections; -Wall; -Werror
Add gcc-style -Wxxx -Wno-xxx warning selection as an alternative to
-w+xxx/-w-xxx.
Add "all" as an alias for all (actual) warnings.
Add "error" to treat warnings as errors.
H. Peter Anvin [Tue, 13 Nov 2007 18:37:23 +0000 (10:37 -0800)]
Clean up the fwrite*() function definitions somewhat
Slight cleanup of the fwrite*() functions. This actually helps gcc
generate better code on i386, for no apparent reason.
H. Peter Anvin [Tue, 13 Nov 2007 17:49:51 +0000 (09:49 -0800)]
Cast 64-bit switch expressions to (int) to keep OpenWatcom happy
Our size arguments are 64-bit values, but we don't need that range for
anywhere where we need a switch. OpenWatcom can't deal with them
(sigh), so cast them to (int) for now.
H. Peter Anvin [Tue, 13 Nov 2007 17:46:38 +0000 (09:46 -0800)]
x86-host-specific performance improvement
If we're on an x86 host, we can do unaligned littleendian memory
references directly. Just do'em.
H. Peter Anvin [Tue, 13 Nov 2007 17:37:59 +0000 (09:37 -0800)]
Address data is int64_t; simplify writing an address object
Address data is always int64_t even if the size itself is smaller;
this was broken on bigendian hosts (still need testing!)
Create simple "write sized object" macros.
H. Peter Anvin [Tue, 13 Nov 2007 07:00:31 +0000 (23:00 -0800)]
ndisasm: factor out the common operand-extraction code
Factor out the common operand-extraction code in the disassembler, as
previously done in the assembler.
H. Peter Anvin [Tue, 13 Nov 2007 06:55:27 +0000 (22:55 -0800)]
Un-special-case "xchg rax,rax"; disassemble o64
Un-special-case "xchg rax,rax"; allow it to be encoded as 48 90 for
orthogonality's sake. It's a no-op, to be sure, but so are many other
instructions.
"xchg eax,eax" is still special-cased in 64-bit mode since it is not a
no-op; unadorned opcode 90 is now simply "nop" and nothing else.
Make the disassembler detect unused REX.W and display them as an "o64"
prefix.
H. Peter Anvin [Tue, 13 Nov 2007 06:11:46 +0000 (22:11 -0800)]
BR 1709392: Fix alignment handling in Mach-O format
Fix alignment handling in the Mach-O format. The patch is from the
bug report, mangled to apply to the current source base. I have no
way to test this, so I'm going to have to assume it's correct.
H. Peter Anvin [Tue, 13 Nov 2007 06:05:31 +0000 (22:05 -0800)]
BR 1828866: fix handling of LAR/LSL
Fix handling of LAR/LSL with various sized operands
H. Peter Anvin [Tue, 13 Nov 2007 05:57:00 +0000 (21:57 -0800)]
Better (but not *good!*) handling of 64-bit addressing in ndisasm
More correct -- but not fully correct -- handing of 64-bit addressing
in ndisasm. In particular, we need to generate "a32" versus "dword"
where applicable.
H. Peter Anvin [Tue, 13 Nov 2007 05:02:33 +0000 (21:02 -0800)]
Fix disassembly of XCHG
"REX.B 90" in 64-bit mode is "xchg eax,r8d" not "nop"; equivalent
situation for "REX.WB 90" (xchg rax,r8).
H. Peter Anvin [Tue, 13 Nov 2007 04:18:33 +0000 (20:18 -0800)]
Test of XCHG
Test for XCHG
H. Peter Anvin [Tue, 13 Nov 2007 04:18:05 +0000 (20:18 -0800)]
Fix handling of XCHG in 64-bit mode
The handling of XCHG in 64-bit mode somewhat broken. Add a register
flag for "not accumulator", so we can generate all the appropriate
modes.
H. Peter Anvin [Tue, 13 Nov 2007 03:36:13 +0000 (19:36 -0800)]
More \321 -> \324 bug fixes
Additional \321 flags (o32) that should be \324 (o64).
H. Peter Anvin [Tue, 13 Nov 2007 02:25:24 +0000 (18:25 -0800)]
float.c: all warnings and errors are pass 1 only
None of the floating-point errors or warnings are anything but pass 1
only; use the ERR_PASS1 flag to capture that.
Charles Crayne [Sun, 11 Nov 2007 05:55:19 +0000 (21:55 -0800)]
Update documentation for stack relative directives.
Bring a few other sections up to date.
Charles Crayne [Sun, 11 Nov 2007 01:52:23 +0000 (17:52 -0800)]
Clean up a few more 32-bit bottlenecks
Charles Crayne [Sat, 10 Nov 2007 00:37:41 +0000 (16:37 -0800)]
Update documantation for stack relative directives