Commit Graph

1355 Commits

Author SHA1 Message Date
Victor van den Elzen
28f4634634 Remove obsolete ROL-EQU hack
Now that there is proper forward reference resolution,
we can get rid of this junk. Wiping the flags also
removed the SBYTEnn flags, causing

cmp eax, a-b
a: nop
b:

to assemble with -Ox like

cmp eax, strict dword -1

This is now fixed.
2008-09-11 13:14:23 +02:00
H. Peter Anvin
233c4945b1 doc: document the use of macros in %error
Document the use of macros in %error and %warning, valid since 2.03.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2008-09-10 23:34:39 -07:00
H. Peter Anvin
1dc23a1b39 doc: Call %xdefine a "resolving define" instead of "enhancing define"
%xdefine is an early-binding %define (%define being late-binding.)
There is nothing "enhanced" about it, it just specifies a different
policy.  Call it a "resolving define" instead.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2008-09-10 23:29:45 -07:00
H. Peter Anvin
3f85cfc766 doc: clean up formatting around -O option
Clean up the formatting in descriptions of the -O option.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2008-09-10 23:27:10 -07:00
H. Peter Anvin
ae13e10593 NASM 2.04rc2 2008-09-10 23:05:18 -07:00
H. Peter Anvin
a2d542ccaa changes: document optimizer change 2008-09-10 23:04:56 -07:00
Charles Crayne
2581c869b1 Decouple forward references from optimization
Users who wish to control the level of optimization can
continue to specify -O0, -O1, or -Ox,
where x can be the letter itself, or any number > 1.

However, even with optimization turned off,
NASM will always make enough passes to resolve
forward references. As a result, INCBIN is now the only
item left in the critical expressions list, although TIMES
still has its own constant value check.
2008-09-10 19:21:52 -07:00
H. Peter Anvin
325a4bff50 Run "make alldeps" 2008-09-09 09:54:47 -07:00
H. Peter Anvin
49039ab636 macros.pl: don't include macros for disabled output formats
Don't include macros for output formats we aren't compiling in.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2008-09-09 09:54:03 -07:00
H. Peter Anvin
5618e0063d outaout.mac: aoutb is an alias for aout
aoutb is an alias format for aout (in the sense they use the same
macro set.)

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2008-09-09 09:53:20 -07:00
H. Peter Anvin
d4ca24338b macros.pl: be a bit more careful with open()
Be a bit more strict with open() calls.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2008-09-09 09:43:16 -07:00
H. Peter Anvin
c357381da4 macros: win32 and win64 are COFF, not Mach-O
Somehow the win32 and win64 aliases got listed on Mach-O, not on
COFF.  This doesn't have any effect on the current code, but might in
the future.  Correct.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2008-09-09 09:37:37 -07:00
H. Peter Anvin
fe1e649b7c NASM 2.04rc1 2008-09-03 15:25:33 -07:00
H. Peter Anvin
3f5ec289e7 Remove obsolete tagrelease script (duplicate of tag-release) 2008-09-03 15:22:23 -07:00
H. Peter Anvin
df73e0b63a Update doc/changes.src 2008-09-03 15:16:44 -07:00
H. Peter Anvin
39e9a5f72f Document %use smartalign 2008-09-03 15:03:20 -07:00
H. Peter Anvin
4a532bc707 Document %unmacro 2008-09-03 14:31:20 -07:00
H. Peter Anvin
fafb6a50e2 outcoff: stylistic cleanups
Don't use explicit L's for things which are really size_t; not only is
it unnecessarily ugly, but it's wrong in a lot of ways.  Do some other
minor stylistic cleanups.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2008-09-02 12:56:39 -07:00
H. Peter Anvin
c00c897df7 outcoff: default output symbols to T_NULL
We would leave the output symbol type uninitialized.  Explicitly
initialize it to zero (T_NULL, meaning no symbol type information),
since that's what was effectively done.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2008-09-02 12:55:35 -07:00
H. Peter Anvin
91fb6f1626 BR 2048950: fix crash due to mmacro list overflow
When allocating the buffer for an mmacro list, we apparently failed to
guarantee space for the terminating NULL.  This almost certainly
caused the crash described in BR 2048950, and quite possibly BR
1284169.
2008-09-01 10:56:33 -07:00
H. Peter Anvin
5c10c17ba0 test/new: clean up whitespace 2008-08-29 18:04:16 -07:00
H. Peter Anvin
1c7cb9e28c Script to create new test case boilerplate 2008-08-29 17:27:00 -07:00
H. Peter Anvin
163e5874d9 Accept implicit memory size for VMREAD/VMWRITE 2008-08-28 18:05:23 -07:00
H. Peter Anvin
5e7d6f1105 BR 2029472: Wrong operand size for VMREAD/VMWRITE in 64-bit mode
Fix the operand size for VMREAD/VMWRITE in 64-bit mode
2008-08-28 18:03:49 -07:00
H. Peter Anvin
c5b37dbf5e .gitignore: ignore some editor backup files
Ignore a couple of variants of editor backup files.
2008-08-28 17:56:17 -07:00
H. Peter Anvin
dd1de39ece BR 2028995: Missing MOVNTI m64, r64
Fix MOVNTI with a 64-bit argument.
2008-08-28 17:54:55 -07:00
H. Peter Anvin
3ba3af3290 Testcase for XCRYPT 2008-08-28 17:48:34 -07:00
H. Peter Anvin
962e30519c BR 2029829: Accept VIA XCRYPT instructions with or without REP
Accept the VIA XCRYPT instructions either with or without a REP
prefix, as documented.

Add the missing XCRYPTCTR instruction.
2008-08-28 17:47:16 -07:00
H. Peter Anvin
7b4dc622c6 BR 2039212: Handle indirect far jumps in 64-bit mode
Handle indirect far jumps in 64-bit mode.  Default to 64 bit unless
overridden, for consistency with other jumps.
2008-08-28 17:35:25 -07:00
H. Peter Anvin
5eff8912bc Include "nasm.h" in "float.h"
"float.h" references efunc, so it needs "nasm.h".
It also has uint8_t and so need <inttypes.h>, but that's part of
"nasm.h".
2008-08-28 13:36:10 -07:00
H. Peter Anvin
04f54809d2 Add 256-bit AVX stores per the latest AVX spec.
Add 256-bit forms of VMOVNTPD, VMOVNTPS, and VMOVNT[DQ]Q.
2008-08-27 18:47:05 -07:00
H. Peter Anvin
06425512ae Add AVX forms of the AES instructions (new in the latest AVX spec)
The AES instructions, too, have gotten VEX forms.
2008-08-27 18:42:26 -07:00
H. Peter Anvin
dace226187 test: Fix file with no final newline
Fix test/br2030823.asm, which had no final newline.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2008-08-24 18:17:09 -07:00
H. Peter Anvin
51e403152a BR 2067820: add the MOVSXD instruction
The official mnemonic for 32-to-64-bit sign extension is MOVSXD for
some idiotic reason.  Add support for it while continue to recognize
MOVSX for this as an alias.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2008-08-24 18:12:20 -07:00
H. Peter Anvin
19f15a50f6 BR 2067837: remove double add of VEX instruction length
We added the length of VEX prefixes twice in calcsize(); this resulted
in the wrong symbol addresses when compiling without the optimizer.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2008-08-24 18:09:04 -07:00
H. Peter Anvin
83b2e4f82c BR 2062342: ndisasm: r12 *can* be an index register
R12 can be used as an index register.  Special encodings in the modr/m
byte are done *without* consideration for the REX prefix, but special
encodings in the SIB byte *do* take the REX prefix into consideration,
since it doesn't affect the overall instruction format.
2008-08-20 09:42:47 -07:00
H. Peter Anvin
2a09b3bf11 BR 2030823: Problem with the 256-bit FMA instructions
Fix the 256-bit FMA instructions per bug report.
2008-08-13 16:25:08 -07:00
H. Peter Anvin
38c6b44909 BR 2043111: Typo in insns.dat: VCMPFT_OQPD VCMPFT_OQPS
Fix typo
2008-08-13 16:18:23 -07:00
Victor van den Elzen
a21194646a minor bugfix in performtest.pl 2008-08-06 15:15:01 +02:00
Victor van den Elzen
22343c2c72 Add macro-defaults warning class and documentation. 2008-08-06 14:48:55 +02:00
H. Peter Anvin
932de6c252 BR 2034542: fix crash when touching __FILE__
Touching __FILE__ would cause a dereference of an uninitialized
pointer.  Fix.
2008-07-31 18:46:11 -07:00
H. Peter Anvin
f7d863b7d1 BR 2028910: fix decoding of VEX prefixes in 16- and 32-bit mode
We would incorrectly set a bunch of VEX-related state for C4 and C5
bytes, even though we had already rejected it as not a VEX prefix due
to the top two bits of the following byte not being 11.
2008-07-30 17:30:12 -07:00
H. Peter Anvin
ecf8c3e382 BR 2025977: Handle SLDT with a 64-bit register operand
Handle SLDT with a 64-bit register operand.  Don't generate a REX.W
prefix in the assembler, since zero-extending is just fine, but do
support it in the disassembler.
2008-07-30 17:28:05 -07:00
H. Peter Anvin
ca348b6343 preproc: restore correct break; in do_directive()
Checkin a26433db68 incorrectly changed a
few break;s in do_directive() that were *inside loops* to returns.
This broke single-line macros as well as %exitrep; fix.
2008-07-23 10:52:43 -04:00
Victor van den Elzen
b916edecf4 BR 560960: warn about trailing garbage in %macro/%ifmacro 2008-07-23 15:14:22 +02:00
Victor van den Elzen
0e857f1fe5 Improve checking and documentation for %ifctx 2008-07-23 13:21:29 +02:00
H. Peter Anvin
bb266eaa4b BR 2023036: MOV reg32,dreg and vice versa are NOLONG
MOV reg32,dreg and MOV dreg,reg32 are NOLONG; in 64-bit mode we always
move to/from reg64.
2008-07-20 14:59:18 -07:00
H. Peter Anvin
0303f3b6f7 Err, "alignr" was really the same as the previous "alignb"
Replace "alignb" with the (slightly more optimized) "alignr" macro,
but keep the name "alignb".
2008-07-20 09:40:14 -07:00
H. Peter Anvin
aad26229b7 Add "alignr" standard macro (using resb)
Add an "alignr" standard macro, for use in BSS (nobits) and absolute
segments.
2008-07-20 09:32:31 -07:00
H. Peter Anvin
a70547f3ae Avoid redundant "const" for macros_t
Don't use a redundant "const" for macros_t (which is const unsigned
char), since OpenWatcom doesn't like it, and I believe it is incorrect
per the C standard.
2008-07-19 21:44:26 -07:00