Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
Document __PASS__, but discourage users from using it.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|
Add a new builtin macro, __PASS__, which is either 1 (for a
preparatory pass), 2 (for a final pass, including preprocessor only),
or 0 (for dependency generation.) This might be useful in special
contexts.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|
Since the error directives, including %warning, are now issued in the
final pass only, it is important that we do *not* pass ERR_PASS1 with
%warning. Rather than playing even more ugly games in error(),
require ERR_PASS1 to be passed in with warnings elsewhere in the
preprocessor, just like the rest of the system.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|
doc/changes.src should contain the user-visible changes in human
comprehensible form (release notes, not a changelog.) Get something
closer to what it should look like for 2.04.
|
|
We had different indentation levels only two paragraphs apart.
Overall, the document is horribly inconsistent about indentation,
which should be fixed.
|
|
Test all of %error, %warning, and %fatal.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|
|
|
Only process %error or %warning directives on the final pass. Add a
new %fatal directive which terminates assembly immediately.
|
|
Change the parser to only issue the "TIMES value %d is negative"
error message if all optimization passes have completed.
|
|
There exists a fair bit of code out there which relies on the
optimizer in order to fit inside a predefined envelope. NASM 2.04rc4
breaks this; write a simple test to demonstrate.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|
|
|
Using multiple %else clauses or mixing %else and %elif
caused strange results.
Warn about it and produce sensible results.
|
|
|
|
Change global_offset_changed from bool to int so that
progress of convergence can be monitored. If change count
does not decrease from previous pass, increment stall counter.
If stall count reaches threshold, terminate assembly
with error message.
|
|
Now NASM won't take unreasonable an amount of time to generate
wrong code when it encounters equ's that don't converge, ex:
FOO equ FOO + 1
|
|
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.
|
|
Document the use of macros in %error and %warning, valid since 2.03.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|
%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>
|
|
Clean up the formatting in descriptions of the -O option.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|
|
|
|
|
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.
|
|
|
|
Don't include macros for output formats we aren't compiling in.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|
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>
|
|
Be a bit more strict with open() calls.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|
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>
|
|
|
|
|
|
|
|
|
|
|
|
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>
|
|
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>
|
|
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.
|
|
|
|
|
|
|
|
Fix the operand size for VMREAD/VMWRITE in 64-bit mode
|
|
Ignore a couple of variants of editor backup files.
|
|
Fix MOVNTI with a 64-bit argument.
|
|
|
|
Accept the VIA XCRYPT instructions either with or without a REP
prefix, as documented.
Add the missing XCRYPTCTR instruction.
|
|
Handle indirect far jumps in 64-bit mode. Default to 64 bit unless
overridden, for consistency with other jumps.
|
|
"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".
|
|
Add 256-bit forms of VMOVNTPD, VMOVNTPS, and VMOVNT[DQ]Q.
|
|
The AES instructions, too, have gotten VEX forms.
|
|
Fix test/br2030823.asm, which had no final newline.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|
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>
|