Commit Graph

666 Commits

Author SHA1 Message Date
Frank Kotler
6ac3135c16 Version 0.99.04 2007-09-25 23:57:21 -04:00
H. Peter Anvin
4cba95cf81 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 :(
2007-09-25 20:36:45 -07:00
H. Peter Anvin
64b3a9c56b nasmdoc: shorten lines which are too long 2007-09-25 16:02:21 -07:00
H. Peter Anvin
f664bf1ed6 Document NASM behaviour for 64-bit immediates and displacements
Document (intended) NASM behaviour for 64-bit immediates and
displacements.
2007-09-25 16:01:07 -07:00
H. Peter Anvin
b0aff17908 test/movimm.asm: add optimizable forms
Add optimizable forms that probably should be shrunk by the optimizer.
2007-09-25 15:44:40 -07:00
H. Peter Anvin
457afd4dad assemble.c: clean up whitespace
Remove stray whitespace
2007-09-25 15:41:19 -07:00
H. Peter Anvin
c58642fbba 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.
2007-09-25 15:40:36 -07:00
H. Peter Anvin
0bd2565dd7 Test of immediate handling on 64-bit mode 2007-09-25 15:39:42 -07:00
H. Peter Anvin
cfdf646e9a 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.
2007-09-25 14:27:34 -07:00
H. Peter Anvin
3e1aaa9dd0 Fix BR 1490407: size of the second operand of LAR/LSL
The second operand of LAR/LSL is always 16 bits.
2007-09-25 14:26:03 -07:00
H. Peter Anvin
f3748bbad0 Makefile.in: make "make install" create directories
Make "make install" create directories if they don't already exist.
2007-09-25 13:34:55 -07:00
H. Peter Anvin
97e15755f9 Fix BR 1445441: uninitialized use of "error_file" 2007-09-25 08:48:37 -07:00
H. Peter Anvin
e373efdab5 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.
2007-09-24 21:33:17 -07:00
H. Peter Anvin
82f9f63378 float.c: clear off uninitialized warning
Remove uninitialized warning (harmless, but annoying.)
2007-09-24 20:53:48 -07:00
H. Peter Anvin
10ba8490ce 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.
2007-09-24 17:02:41 -07:00
H. Peter Anvin
415c7ced1d 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.
2007-09-24 15:56:02 -07:00
H. Peter Anvin
ea1a81b16e 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.
2007-09-24 15:55:20 -07:00
H. Peter Anvin
2a5156b284 Additional compaction missed by script
Additional mmxreg/mem -> mmxrm and xmmreg/mem -> xmmrm compactions
which the script missed.
2007-09-24 15:48:09 -07:00
H. Peter Anvin
86317c423d 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.
2007-09-24 15:42:53 -07:00
H. Peter Anvin
ed29882b51 nasmdoc: grammar fix
half -> halves
2007-09-24 13:54:00 -07:00
H. Peter Anvin
1fd23400fd nasmdoc: remove stray periods
A title line doesn't end in a period.
2007-09-24 13:44:02 -07:00
H. Peter Anvin
9713703db7 test/Makefile: make a bit more useful 2007-09-24 13:42:09 -07:00
H. Peter Anvin
37a321fbbe 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.
2007-09-24 13:41:58 -07:00
H. Peter Anvin
dee8eaa967 nasmdoc: clarify __float*__ example 2007-09-24 12:52:09 -07:00
H. Peter Anvin
ea043ef039 nasmdoc: document the __float*__ operators 2007-09-24 12:44:38 -07:00
H. Peter Anvin
dc467ba8af 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.
2007-09-24 12:30:54 -07:00
H. Peter Anvin
5f77c031fa eval.c: replace sequence of ifs with switch
Replace a sequence of "if" statements with a switch.
2007-09-24 10:51:07 -07:00
H. Peter Anvin
0c3e395cc1 tokhash: allow a bit smarter pattern matching
Allow constants to match only part of the token string.
2007-09-24 10:50:23 -07:00
H. Peter Anvin
fc565dd362 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.
2007-09-22 22:35:28 -07:00
H. Peter Anvin
438ed48c49 Reformat insns.dat to uniform column width
Add a script to reformat insns.dat to uniform width, and use it.
2007-09-22 22:02:34 -07:00
H. Peter Anvin
20dec371dc Simple test for 0x67 prefixes 2007-09-22 21:50:03 -07:00
H. Peter Anvin
c5b9ce0a84 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.)
2007-09-22 21:49:51 -07:00
H. Peter Anvin
f04031bbd7 Make test/Makefile a bit more useful
Make all the tests depend on the nasm binary...
2007-09-22 21:47:13 -07:00
H. Peter Anvin
4408b6265c Add TY_OWORD for "DO" output 2007-09-22 21:29:41 -07:00
H. Peter Anvin
8fcca64a2a LDDQU needs \301 (BR 1103549) 2007-09-22 19:52:11 -07:00
H. Peter Anvin
dcb4b885d5 RDTSCP and INVLPGA aren't 64-bit specific
X64 means X86_64,LM -- long mode only.
2007-09-22 19:51:13 -07:00
H. Peter Anvin
f5c8cf0027 Cyrix GX1 instructions: BBx_RESET, CPU_READ, CPU_WRITE 2007-09-22 19:40:37 -07:00
H. Peter Anvin
763cb77c90 Centaur XSHA1, XSHA256, MONTMUL 2007-09-22 19:28:14 -07:00
H. Peter Anvin
4d283f685f Implement Centaur's XCRYPT instructions
Implement Centaur's XCRYPT instruction (RFE 825529)
2007-09-22 19:20:56 -07:00
H. Peter Anvin
83828b6ce8 Add Geode LX (AMD's Cyrix-derived core) instructions
Add Geode's instructions: DMINT, RDM, PFRCP, PFRSQRT
2007-09-22 19:13:05 -07:00
H. Peter Anvin
48f7a93c0a Add the GETSEC instruction for Intel SMX 2007-09-22 19:05:11 -07:00
H. Peter Anvin
4ca9d78c5f Add the AMD SSE4a and LZCNT instructions
Add AMD SSE4a and LZCNT
2007-09-22 18:59:18 -07:00
H. Peter Anvin
57f38cdc0b 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.
2007-09-22 18:23:20 -07:00
H. Peter Anvin
269700972c 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.
2007-09-22 18:20:49 -07:00
H. Peter Anvin
25a993488c 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.
2007-09-22 17:45:45 -07:00
H. Peter Anvin
441ad9d9b2 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".
2007-09-22 16:44:56 -07:00
H. Peter Anvin
7b45fbb127 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.
2007-09-22 16:38:25 -07:00
H. Peter Anvin
9b8f0ad113 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).
2007-09-22 16:35:11 -07:00
H. Peter Anvin
b10f3e2dca 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.
2007-09-22 16:19:19 -07:00
Charles Crayne
af31d43368 Merge branch 'master' of git+ssh://ccrayne@repo.or.cz/srv/git/nasm 2007-09-20 21:33:43 -07:00