H. Peter Anvin [Wed, 10 Oct 2007 21:06:59 +0000 (14:06 -0700)]
Create option -Ox to tell NASM to do unlimited passes
Add option -Ox to tell NASM to do as many passes as it needs, instead
of imposing a fixed number.
H. Peter Anvin [Tue, 9 Oct 2007 02:26:57 +0000 (19:26 -0700)]
Revert "floatb.asm: fix broken testcase"
This reverts commit
d9e3116be19165325ee9457bc207d47300075739.
0x513c1704 is 50.49e9, not 50.40e9
H. Peter Anvin [Tue, 9 Oct 2007 01:39:24 +0000 (18:39 -0700)]
floatb.asm: fix broken testcase
50.40e9 as a 32-bit float is 0x513c1704
H. Peter Anvin [Mon, 8 Oct 2007 19:41:00 +0000 (12:41 -0700)]
saa_rstruct: fix overrun check
The direction of the overrun test in saa_rstruct was backwards.
H. Peter Anvin [Mon, 8 Oct 2007 19:12:23 +0000 (12:12 -0700)]
Add Frank's floattest.asm test file
H. Peter Anvin [Mon, 8 Oct 2007 04:13:14 +0000 (21:13 -0700)]
saa_fpwrite: initializing "len" should be part of the loop
"len" should properly be initialized on every turn of the loop. It
can be initialized to any value >= blk_len that fits in a size_t.
(size_t)~0 would work except for any possible noncompliant C compilers
that have a signed size_t (illegal per C99 7.17.2).
Charles Crayne [Mon, 8 Oct 2007 01:46:57 +0000 (18:46 -0700)]
Fix infinite loop in function saa_fpwrite
H. Peter Anvin [Sat, 6 Oct 2007 00:44:16 +0000 (17:44 -0700)]
zerobyte.asm: use a real instruction to avoid confusing ndisasm
It's useful to be able to disassemble a test case, so avoid mixing
data bytes and code.
H. Peter Anvin [Sat, 6 Oct 2007 00:42:31 +0000 (17:42 -0700)]
zerobyte.asm: add test cases for non-initial \170 uses
Add test cases for noninitial uses of \170, in order to test for
accidental duplication of REX prefixes.
H. Peter Anvin [Sat, 6 Oct 2007 00:29:01 +0000 (17:29 -0700)]
Check in the proper zerobyte test
The previous checkin checked in zerobyte.bin, not zerobyte.asm
H. Peter Anvin [Sat, 6 Oct 2007 00:04:32 +0000 (17:04 -0700)]
Emit REX prefix before literal zero (\170)
H. Peter Anvin [Sat, 6 Oct 2007 00:01:15 +0000 (17:01 -0700)]
LICENSE: Break long line
H. Peter Anvin [Fri, 5 Oct 2007 21:36:03 +0000 (14:36 -0700)]
Add test for problematic floats
H. Peter Anvin [Fri, 5 Oct 2007 06:51:08 +0000 (23:51 -0700)]
floatx.asm: add Inf and NaN to the boundary condition tests
H. Peter Anvin [Fri, 5 Oct 2007 06:09:19 +0000 (23:09 -0700)]
floatx.asm: add specific tests for exponent boundary conditions
Add tests for the exponent boundaries (underflow, denorm, normal).
H. Peter Anvin [Fri, 5 Oct 2007 05:51:08 +0000 (22:51 -0700)]
float.c: correct the exponent
We would accidentally produce an exponent which was exactly +1 from
the correct one.
H. Peter Anvin [Thu, 4 Oct 2007 22:18:23 +0000 (15:18 -0700)]
Additional rules in test/Makefile
Add rules for .pl -> .asm
H. Peter Anvin [Thu, 4 Oct 2007 20:42:56 +0000 (13:42 -0700)]
Rewrite the handling of SAA's to allow random access
SAA's were never intended to allow random access, but several backends
do random or semirandom access via saa_fread() and saa_fwrite()
anyway. Rewrite the SAA system to allow for efficient random access.
On "label.pl
10000000" this improves performance by a factor of 12.
H. Peter Anvin [Thu, 4 Oct 2007 04:30:57 +0000 (21:30 -0700)]
Change cloc_t to struct location, and reorder the members
Change cloc_t to struct location, and reorder the members so that it
should fit in 16 bytes instead of needing 8 bytes of extra padding on
64-bit machines.
H. Peter Anvin [Thu, 4 Oct 2007 04:24:51 +0000 (21:24 -0700)]
BR 1352920: change loc_t -> cloc_t
Change loc_t to cloc_t to avoid AIX conflict.
We really shouldn't use _t names at all; they are usually considered
platform types, but worry about that later.
H. Peter Anvin [Thu, 4 Oct 2007 04:22:16 +0000 (21:22 -0700)]
BR 1352920: Handle upper case %line
H. Peter Anvin [Thu, 4 Oct 2007 00:40:12 +0000 (17:40 -0700)]
Use autoconf to request feature macros
H. Peter Anvin [Wed, 3 Oct 2007 05:04:15 +0000 (22:04 -0700)]
preproc.c: constipation
Add "const" in suitable places
H. Peter Anvin [Wed, 3 Oct 2007 04:57:27 +0000 (21:57 -0700)]
make alldeps
H. Peter Anvin [Wed, 3 Oct 2007 04:53:51 +0000 (21:53 -0700)]
Portability fixes
Concentrate compiler dependencies to compiler.h; make sure compiler.h
is included first in every .c file (since some prototypes may depend
on the presence of feature request macros.)
Actually use the conditional inclusion of various functions (totally
broken in previous releases.)
H. Peter Anvin [Wed, 3 Oct 2007 04:13:18 +0000 (21:13 -0700)]
Run "make alldeps".
Run "make alldeps". This stuff probably shouldn't be checked in...
H. Peter Anvin [Wed, 3 Oct 2007 00:40:00 +0000 (17:40 -0700)]
Use the crc64 we already use as the perfect hash function prehash
Use the same crc64 that we already use for the symbol table hash as
the perfect hash function prehash. We appear to get radically faster
convergence this way, and the crc64 is probably *faster*, since the
table likely to be resident in memory.
H. Peter Anvin [Tue, 2 Oct 2007 22:09:33 +0000 (15:09 -0700)]
insns.dat: add systematic names for the hinting NOPs (0F18-0F1F)
0F 18-1F are reserved for hinting NOPs; they all take a single memory
operand which may be sized. Allow the use of systematic names; this
also makes sure they get sensibly disassembled.
H. Peter Anvin [Mon, 1 Oct 2007 18:28:32 +0000 (11:28 -0700)]
Unspecified files are null strings, not null pointers
We use empty strings, not null pointers, for unspecified files, so
there is no need to compare them for nullness.
H. Peter Anvin [Mon, 1 Oct 2007 18:26:31 +0000 (11:26 -0700)]
Check for the most basic filename overlaps
Check for the most basic filename overlaps, in case we have the
opportunity to save the user from himself.
Charles Crayne [Mon, 1 Oct 2007 05:15:36 +0000 (22:15 -0700)]
modified: nasm.1 to add newer command line options
modified: nasm.c to fully parse command line before redirecting stderr.
Charles Crayne [Sat, 29 Sep 2007 04:27:41 +0000 (21:27 -0700)]
Merge branch 'master' of git+ssh://ccrayne@repo.or.cz/srv/git/nasm
H. Peter Anvin [Sat, 29 Sep 2007 03:17:12 +0000 (20:17 -0700)]
configure.in: AC_SUBST_FILE should have been AC_SUBST
AC_SUBST_FILE happened to work in autoconf 2.59, but is broken in
autoconf 2.61.
H. Peter Anvin [Sat, 29 Sep 2007 00:17:20 +0000 (17:17 -0700)]
Unbreak relative references to immediate addresses
Remove bogus "treat labels different from immediates" code, which
would result in generating of a relative mod/rm but without adjusting
the address accordingly.
Update addressing mode test.
Charles Crayne [Fri, 28 Sep 2007 22:16:47 +0000 (15:16 -0700)]
Merge branch 'master' of git+ssh://ccrayne@repo.or.cz/srv/git/nasm
H. Peter Anvin [Fri, 28 Sep 2007 19:01:55 +0000 (12:01 -0700)]
lib/vsnprintf.c: correct boundary conditions
Correct the boundary conditions in lib/vsnprintf.c; as it was we could
have an undetected one-byte overwrite.
H. Peter Anvin [Fri, 28 Sep 2007 17:50:20 +0000 (10:50 -0700)]
Add substitutes for snprintf() and vsnprintf()
To deal with fools^Wpeople trying to keep really old systems alive,
create a proper framework for substitution functions, and make it
possible to deal with the lack of snprintf/vsnprintf in particular.
Frank Kotler [Fri, 28 Sep 2007 06:03:41 +0000 (02:03 -0400)]
Merge branch 'master' of git+ssh://fbkotler@repo.or.cz/srv/git/nasm
H. Peter Anvin [Fri, 28 Sep 2007 04:35:04 +0000 (21:35 -0700)]
Exclude config.h from the dependency list for the canned makefiles
For the canned makefiles, we almost certainly don't have config.h, and
shouldn't include it in the list of dependencies.
H. Peter Anvin [Fri, 28 Sep 2007 04:12:17 +0000 (21:12 -0700)]
version.pl: Add support for daily snapshot releases
Add support for daily snapshot releases of the form
<ordinary version number>-<datecode>. These are exported to programs
as the new macro __NASM_SNAPSHOT__ (only present in snapshot releases.)
H. Peter Anvin [Fri, 28 Sep 2007 02:46:55 +0000 (19:46 -0700)]
Add Makefile for Linux -> DOS, Win32, OS/2 using OpenWatcom
Add a Makefile (for GNU Make, not wmake) to cross-compile NASM for
DOS, OS/2 or Win32 using OpenWatcom.
H. Peter Anvin [Thu, 27 Sep 2007 02:57:07 +0000 (19:57 -0700)]
Add Makefile for OpenWatcom (DOS, OS/2 or Win32 output)
Add a Makefile for OpenWatcom using WMAKE. This is a horrible version
of Make, but since it's bundled with OpenWatcom it is probably better
to stick to it. It has the nice property that it can produce DOS,
Win32 or OS/2 binaries.
This Makefile currently assumes that it is hosted on a system where
pathname separators are backslashes. For cross-compiling using
OpenWatcom on a Linux system it is probably better to write a separate
Makefile using GNU make to invoke Watcom.
H. Peter Anvin [Thu, 27 Sep 2007 00:00:18 +0000 (17:00 -0700)]
Test for various addressing modes in 64-bit mode
Test of various addressing modes in 64-bit mode. Relative addresses
specified as numbers are currently broken!!
H. Peter Anvin [Wed, 26 Sep 2007 22:19:28 +0000 (15:19 -0700)]
nasm option reshuffling, -E -> -Z
Old -E becomes -Z
New -E is alias for -e
Remove the obsolete -r option
Frank Kotler [Wed, 26 Sep 2007 03:57:21 +0000 (23:57 -0400)]
Version 0.99.04
H. Peter Anvin [Wed, 26 Sep 2007 03:36:45 +0000 (20:36 -0700)]
nasmdoc: corrections on 64-bit immediates/displacements
Corrections the section on 64-bit immediates and displacements. In
particular, immediates are sign-extended the same way displacements
are (and the same way 8-bit immediates are), so there is some use for
the 7-byte mov eax,dword imm form :(
H. Peter Anvin [Tue, 25 Sep 2007 23:02:21 +0000 (16:02 -0700)]
nasmdoc: shorten lines which are too long
H. Peter Anvin [Tue, 25 Sep 2007 23:01:07 +0000 (16:01 -0700)]
Document NASM behaviour for 64-bit immediates and displacements
Document (intended) NASM behaviour for 64-bit immediates and
displacements.
H. Peter Anvin [Tue, 25 Sep 2007 22:44:40 +0000 (15:44 -0700)]
test/movimm.asm: add optimizable forms
Add optimizable forms that probably should be shrunk by the optimizer.
H. Peter Anvin [Tue, 25 Sep 2007 22:41:19 +0000 (15:41 -0700)]
assemble.c: clean up whitespace
Remove stray whitespace
H. Peter Anvin [Tue, 25 Sep 2007 22:40:36 +0000 (15:40 -0700)]
Correct the handling of "MOV" with immediate in 64-bit mode
Correct the handling of "MOV" with immediate in 64-bit mode. With
these changes, movimm.asm produces the desired results.
H. Peter Anvin [Tue, 25 Sep 2007 22:39:42 +0000 (15:39 -0700)]
Test of immediate handling on 64-bit mode
H. Peter Anvin [Tue, 25 Sep 2007 21:27:34 +0000 (14:27 -0700)]
Add nasm_zalloc() to nasmlib.c
Add nasm_zalloc(), a wrapper around calloc(), to allocate
zero-initialized memory. For large allocations, this is often far
more efficient than allocating and zeroing, since the operating system
tends to keep a pool of zero pages around.
H. Peter Anvin [Tue, 25 Sep 2007 21:11:29 +0000 (14:11 -0700)]
Fix BR 1490407: size of the second operand of LAR/LSL
The second operand of LAR/LSL is always 16 bits.
H. Peter Anvin [Tue, 25 Sep 2007 21:11:29 +0000 (14:11 -0700)]
Fix BR 1490407: size of the second operand of LAR/LSL
The second operand of LAR/LSL is always 16 bits.
H. Peter Anvin [Tue, 25 Sep 2007 20:34:55 +0000 (13:34 -0700)]
Makefile.in: make "make install" create directories
Make "make install" create directories if they don't already exist.
H. Peter Anvin [Tue, 25 Sep 2007 15:47:47 +0000 (08:47 -0700)]
Fix BR 1445441: uninitialized use of "error_file"
H. Peter Anvin [Tue, 25 Sep 2007 04:33:17 +0000 (21:33 -0700)]
preproc.c: fix the loop in %undef
The parent-pointer-based freeing loop in %undef should not advance the
parent pointer when a node is freed, since that will result accessing
freed memory.
H. Peter Anvin [Tue, 25 Sep 2007 03:53:48 +0000 (20:53 -0700)]
float.c: clear off uninitialized warning
Remove uninitialized warning (harmless, but annoying.)
H. Peter Anvin [Tue, 25 Sep 2007 00:02:07 +0000 (17:02 -0700)]
outcoff: set the "virtual size field" to zero (BR 1351586)
Per SF bug report 1351586:
The COFF spec suggests that the "Virtual Size" field (which
immediately follows the name field inside a section header) be set to
0 for an object file.
By contrast (as documented in comment #4 at the beginning of its
outcoff.c file) NASM sets it to a particular non-0 value.
MASM 6.15 matches NASM for both 16- and 32-bit object files,
i.e. emits non-0 values.
MASM 8 (from VS 2005 Beta) matches the COFF spec for 64-bit object
files, i.e. emits 0.
GAS matches the COFF spec for 32-bit object files (MinGW or Cygwin),
i.e. also emits 0.
Older versions of GNU ld seem to honor said "Virtual Size" field
whereas newer versions do not. As a result those older versions
generate "bloated" image files.
Since the COFF spec and the real world seem to disagree for this case,
it might make sense to add a method for selecting between the two to
NASM.
Date: 2005-11-28 15:39
Sender: nasm64developer
Logged In: YES
user_id=804543
MASM 8 (from VS 2005 Beta) also matches the COFF spec for 16- and
32-bit object files, i.e. emits 0.
That said, NASM should always emit 0 too. Therefore I am turning this
from a support request into a bug.
H. Peter Anvin [Mon, 24 Sep 2007 22:56:02 +0000 (15:56 -0700)]
insns.dat: SMINT - mark ND, DMINT - fix opcode
Fix the opcode for DMINT (0F 39); mark SMINT (0F 38) as ND since 0F 38
is used as a prefix by newer processors.
H. Peter Anvin [Mon, 24 Sep 2007 22:55:20 +0000 (15:55 -0700)]
0F0F is a 3Dnow! prefix; remove from prefix list
3Dnow! prefixes cannot be disambiguated via pointer chasing, since
the third byte of the opcode field follows the EA.
H. Peter Anvin [Mon, 24 Sep 2007 22:48:09 +0000 (15:48 -0700)]
Additional compaction missed by script
Additional mmxreg/mem -> mmxrm and xmmreg/mem -> xmmrm compactions
which the script missed.
H. Peter Anvin [Mon, 24 Sep 2007 22:42:53 +0000 (15:42 -0700)]
insns.dat: machine-generated compaction mmx/xmmreg,mem -> mmx/xmmrm
Reduce the total instruction count by compacting mmxreg:mem pairs to
mmxrm and d:o for xmmreg:mem -> xmmrm.
H. Peter Anvin [Mon, 24 Sep 2007 20:54:00 +0000 (13:54 -0700)]
nasmdoc: grammar fix
half -> halves
H. Peter Anvin [Mon, 24 Sep 2007 20:44:02 +0000 (13:44 -0700)]
nasmdoc: remove stray periods
A title line doesn't end in a period.
H. Peter Anvin [Mon, 24 Sep 2007 20:42:09 +0000 (13:42 -0700)]
test/Makefile: make a bit more useful
H. Peter Anvin [Mon, 24 Sep 2007 20:41:58 +0000 (13:41 -0700)]
Implement the -MG option (SF RFE 1564264)
Implement the -MG option, to generate dependencies in the presence of
generated files. In the end, we probably need to support the full
gamut of GCC-like dependency-generation options.
H. Peter Anvin [Mon, 24 Sep 2007 19:52:09 +0000 (12:52 -0700)]
nasmdoc: clarify __float*__ example
H. Peter Anvin [Mon, 24 Sep 2007 19:44:38 +0000 (12:44 -0700)]
nasmdoc: document the __float*__ operators
H. Peter Anvin [Mon, 24 Sep 2007 19:30:54 +0000 (12:30 -0700)]
Support __float*__ for floating-point numbers in expressions
Add special operators to allow the use of floating-point constants in
contexts other than DW/DD/DQ/DT/DO.
As part of this checkin, make MAX_KEYWORD generated by tokhash.pl,
since it knows what all the keywords are so it can tell which one is
the longest.
H. Peter Anvin [Mon, 24 Sep 2007 17:51:07 +0000 (10:51 -0700)]
eval.c: replace sequence of ifs with switch
Replace a sequence of "if" statements with a switch.
H. Peter Anvin [Mon, 24 Sep 2007 17:50:23 +0000 (10:50 -0700)]
tokhash: allow a bit smarter pattern matching
Allow constants to match only part of the token string.
H. Peter Anvin [Sun, 23 Sep 2007 05:33:56 +0000 (22:33 -0700)]
Implement INVLPGA according to the documentation
INVLPGA is defined as taking rax,ecx but "the portion of rax used to
form the address is determined by the effective address size", so it
is really ax/eax/rax.
H. Peter Anvin [Sun, 23 Sep 2007 05:02:34 +0000 (22:02 -0700)]
Reformat insns.dat to uniform column width
Add a script to reformat insns.dat to uniform width, and use it.
H. Peter Anvin [Sun, 23 Sep 2007 04:50:03 +0000 (21:50 -0700)]
Simple test for 0x67 prefixes
H. Peter Anvin [Sun, 23 Sep 2007 04:49:51 +0000 (21:49 -0700)]
Auto-generate 0x67 prefixes without the need for \30x codes
Auto-generate 0x67 prefixes without the need for \30x codes; the
prefix is automatically added when there is a memory operand with
address size differing from the current address size (and impossible
combinations checked for.)
H. Peter Anvin [Sun, 23 Sep 2007 04:47:13 +0000 (21:47 -0700)]
Make test/Makefile a bit more useful
Make all the tests depend on the nasm binary...
H. Peter Anvin [Sun, 23 Sep 2007 04:29:41 +0000 (21:29 -0700)]
Add TY_OWORD for "DO" output
H. Peter Anvin [Sun, 23 Sep 2007 02:52:11 +0000 (19:52 -0700)]
LDDQU needs \301 (BR 1103549)
H. Peter Anvin [Sun, 23 Sep 2007 02:51:13 +0000 (19:51 -0700)]
RDTSCP and INVLPGA aren't 64-bit specific
X64 means X86_64,LM -- long mode only.
H. Peter Anvin [Sun, 23 Sep 2007 02:40:37 +0000 (19:40 -0700)]
Cyrix GX1 instructions: BBx_RESET, CPU_READ, CPU_WRITE
H. Peter Anvin [Sun, 23 Sep 2007 02:28:14 +0000 (19:28 -0700)]
Centaur XSHA1, XSHA256, MONTMUL
H. Peter Anvin [Sun, 23 Sep 2007 02:20:56 +0000 (19:20 -0700)]
Implement Centaur's XCRYPT instructions
Implement Centaur's XCRYPT instruction (RFE 825529)
H. Peter Anvin [Sun, 23 Sep 2007 02:13:05 +0000 (19:13 -0700)]
Add Geode LX (AMD's Cyrix-derived core) instructions
Add Geode's instructions: DMINT, RDM, PFRCP, PFRSQRT
H. Peter Anvin [Sun, 23 Sep 2007 02:05:11 +0000 (19:05 -0700)]
Add the GETSEC instruction for Intel SMX
H. Peter Anvin [Sun, 23 Sep 2007 01:59:18 +0000 (18:59 -0700)]
Add the AMD SSE4a and LZCNT instructions
Add AMD SSE4a and LZCNT
H. Peter Anvin [Sun, 23 Sep 2007 01:23:20 +0000 (18:23 -0700)]
Tag UMOV as ND (no disassembly) to avoid collision
The UMOV opcodes have been recycled; tag UMOV as ND until we have a
better way to specify to the disassembler exactly how it wants
instructions interpreted.
H. Peter Anvin [Sun, 23 Sep 2007 01:16:52 +0000 (18:16 -0700)]
Disallow optimizing by less than 5 passes.
Disallow optimizing by less than 5 passes. If the user requests 2-4
passes, run 5 passes anyway.
H. Peter Anvin [Sun, 23 Sep 2007 00:45:45 +0000 (17:45 -0700)]
BR 1783117: Document that %+ needs a space after it, and fix crash
Document that %+ needs a space after it due to collision with %+1
syntax for multiline macro arguments; make it issue an error message
rather than crashing.
H. Peter Anvin [Sat, 22 Sep 2007 23:44:56 +0000 (16:44 -0700)]
nasm.spec.in: minor fixes
%setup needs -n to deal with the case when nasm_version != _version
There is no standard %make macro, just use "make".
H. Peter Anvin [Sat, 22 Sep 2007 23:38:25 +0000 (16:38 -0700)]
release script: handle stricter CLI parsing for "git tag"
The current version of "git tag" seems to demand that the options
precede arguments; the name is an argument, but the -m option and its
parameter is an option.
H. Peter Anvin [Sat, 22 Sep 2007 23:35:11 +0000 (16:35 -0700)]
Update nasm.spec.in and make it handle rc releases
Update nasm.spec.in to match modern conventions, and make it handle rc
releases by using the "mangled" version of the name (1.99.99.91
instead of 2.0rc1).
H. Peter Anvin [Sat, 22 Sep 2007 23:19:19 +0000 (16:19 -0700)]
version.pl: support version numbers of the form X.Y[.Z]rcW
Support version numbers of the form X.Y[.Z]rcW where X, Y, Z and W are
numbers. For the numeric macros, drop them down to a lower level, so
2.0rc1 is treated as version 1.99.99.91.
Charles Crayne [Fri, 21 Sep 2007 04:33:43 +0000 (21:33 -0700)]
Merge branch 'master' of git+ssh://ccrayne@repo.or.cz/srv/git/nasm
Charles Crayne [Fri, 21 Sep 2007 04:12:33 +0000 (21:12 -0700)]
modified: misc/release to fix bug in removing .git
H. Peter Anvin [Thu, 20 Sep 2007 04:41:43 +0000 (21:41 -0700)]
Merge branch 'master' of git+ssh://repo.or.cz/srv/git/nasm
H. Peter Anvin [Thu, 20 Sep 2007 04:41:27 +0000 (21:41 -0700)]
Update manual pages
Update manual pages to include 64-bit support, and remove section
about sync point limits in ndisasm.
H. Peter Anvin [Thu, 20 Sep 2007 04:41:02 +0000 (21:41 -0700)]
Remove limit on number of sync points
Make it possible for ndisasm to allocate more memory for sync points
as needed.
H. Peter Anvin [Thu, 20 Sep 2007 04:40:37 +0000 (21:40 -0700)]
Make nasm_malloc() et al available from inside ndisasm
Clean up nasmlib to remove functions irrelevant for ndisasm; make
nasm_malloc() etc usable inside ndisasm.