H. Peter Anvin [Mon, 20 Oct 2008 05:14:30 +0000 (22:14 -0700)]
preproc: error on unterminated %[...]
Make unterminated %[...] constructs an error.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
H. Peter Anvin [Mon, 20 Oct 2008 05:12:06 +0000 (22:12 -0700)]
preproc: fix exit conditions for indirection loop
When locating the end of a %[...] construct, we need to end up with
the pointer pointing to the terminating character.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
H. Peter Anvin [Mon, 20 Oct 2008 02:30:11 +0000 (19:30 -0700)]
preproc: correctly handle quoted strings inside %[...] constructs
We need to skip quoted strings when determining the ending point of
%[...] constructs.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
H. Peter Anvin [Mon, 20 Oct 2008 00:00:52 +0000 (17:00 -0700)]
doc: document the %[...] construct.
Add documentation for the %[...] construct.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
H. Peter Anvin [Sun, 19 Oct 2008 23:47:53 +0000 (16:47 -0700)]
test: better smartalign tests
Smartalign tests for 16, 32 and 64-bit mode.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
H. Peter Anvin [Sun, 19 Oct 2008 23:45:27 +0000 (16:45 -0700)]
smartalign: use a "times" construct rather than %rep
Use a "times" construct rather than "%rep" for higher performance.
No need to preprocess the same line over and over for no good reason.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
H. Peter Anvin [Sun, 19 Oct 2008 23:44:02 +0000 (16:44 -0700)]
macros.pl: handle \-continuation lines in macros.pl
Correctly handle \-continuation lines in macros.pl.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
H. Peter Anvin [Sun, 19 Oct 2008 23:38:28 +0000 (16:38 -0700)]
smartalign: rewrite to use the indirect construct, %[...]
This code can be made so much smaller with clever use of the
indirection construct.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
H. Peter Anvin [Sun, 19 Oct 2008 23:25:57 +0000 (16:25 -0700)]
test: add test for preprocessor indirection construct
Add a test for the preprocessor indirection construct, %[...].
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
H. Peter Anvin [Sun, 19 Oct 2008 23:24:53 +0000 (16:24 -0700)]
preproc: fix list iteration in the case of expand_indirect()
Linked lists where an element may be deleted or substituted during
processing can be subtle to deal with. Fix the iteration conditions
in this particular case.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
H. Peter Anvin [Sun, 19 Oct 2008 22:45:05 +0000 (15:45 -0700)]
preproc: Add new %[...] indirection construct
Add a new %[...] construct to support indirect macro expansion.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
H. Peter Anvin [Sun, 19 Oct 2008 21:53:48 +0000 (14:53 -0700)]
NASM 2.05rc7
H. Peter Anvin [Sat, 18 Oct 2008 18:29:11 +0000 (11:29 -0700)]
ELF64: once again, fix generation of "naked" OUT_REL*ADR
It is unclear if we will ever see any "naked" (absolute bytes)
OUT_REL*ADR coming from the assembler, but if we do, we should
generate them correctly.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
H. Peter Anvin [Sat, 18 Oct 2008 06:37:43 +0000 (23:37 -0700)]
NASM 2.05rc6
H. Peter Anvin [Sat, 18 Oct 2008 06:36:45 +0000 (23:36 -0700)]
doc/changes.src: document massive changes to ELF64 backend
We didn't just fix the GOT stuff, but also now properly use RELA and
so forth.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
H. Peter Anvin [Sat, 18 Oct 2008 06:32:40 +0000 (23:32 -0700)]
ELF64: PLT32, GOTPCREL, and GOTPCREL64 really need exactitude
Now when the assembler is properly generating the address that we push
down to the backend, enable requesting an exact value for these
relocations (these are pointing to a specific GOT or PLT slot; the
addend is used to adjust the computed value in the instruction, not
for offset for the symbol.)
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
H. Peter Anvin [Sat, 18 Oct 2008 06:30:54 +0000 (23:30 -0700)]
ELF64: the "size" argument to OUT_REL*ADR isn't really the size
The "size" argument to the OUT_REL*ADR output types is actually
intra-instruction offset, not the actual size. Thus, emit the size
properly.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
H. Peter Anvin [Sat, 18 Oct 2008 06:29:11 +0000 (23:29 -0700)]
assemble: for OUT_REL*ADR, the "size" argument is not really size...
For OUT_REL*ADR, the "size" argument is actually the offset inside the
instruction; that is in fact why we encode the real size in the
instruction itself. Thus, emit the offsets properly using this
mechanism when generating relative EAs.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
H. Peter Anvin [Sat, 18 Oct 2008 06:14:53 +0000 (23:14 -0700)]
test/elf64so.asm: demonstrate a case where we bind to the wrong symbol
Show an artificial case where we bind to the wrong symbol, due to the
confusion in the output system between the size of relative symbols
and their position.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
H. Peter Anvin [Sat, 18 Oct 2008 06:06:46 +0000 (23:06 -0700)]
ELF64: actually generate relative GOT/PLT references correctly
Fix the arithmetic for relative GOT/PLT references.
We still can't enable exactitude, because of the assumption that
"size" is always the proper adjustment for the offset of the
displacement inside the instruction, which is wrong in the case of
displacements that are followed by an immediate. This also affects
the list file, so it really should be fixed.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
H. Peter Anvin [Sat, 18 Oct 2008 06:03:04 +0000 (23:03 -0700)]
test/Makefile: enable debugging info for elftest/elftest64
Enable debugging information for the ELF tests.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
H. Peter Anvin [Sat, 18 Oct 2008 05:22:17 +0000 (22:22 -0700)]
ELF64: GOTOFF64 doesn't need a gsym at all
GOTOFF64 is used for local variables (as a 64-bit offset from the GOT;
only needed in the Medium PIC or Large PIC models.) It therefore
should *not* be a elf_add_gsym_reloc() invocation.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
H. Peter Anvin [Sat, 18 Oct 2008 05:11:20 +0000 (22:11 -0700)]
ELF64: We apparently don't need exactitude for GOTOFF64
I am having a bit of a hard time understanding the proper operation of
the "exact" flag to elf_add_gsym_reloc(). We apparently won't
generate proper GOTOFF64 relocations with this flag set; it is
possible that there are *no* proper uses of this flag. This clearly
needs to be figured out.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
H. Peter Anvin [Sat, 18 Oct 2008 05:10:33 +0000 (22:10 -0700)]
elftest64: both Small PIC and Medium PIC model tests
Try both Small PIC and Medium PIC model references.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
H. Peter Anvin [Sat, 18 Oct 2008 03:01:16 +0000 (20:01 -0700)]
ELF64: GOT and PLT references need a symbol (a slot!) to reference
GOT and PLT references need a symbol; after all, they reference a GOT
or PLT slot. Thus, they need elf_add_gsym_reloc(). Mungify the
interface so that they can communicate the need for the PC-shifted
offset into the relocation.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
H. Peter Anvin [Sat, 18 Oct 2008 02:32:10 +0000 (19:32 -0700)]
ELF64: unbreak generating no-segment addresses
When generating an address that is *not* tied to a symbol, we just
want to emit the bytes. I believe the assembler is already supposed
to do that for us, but just in case, do it right here too.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
H. Peter Anvin [Sat, 18 Oct 2008 02:30:34 +0000 (19:30 -0700)]
SAA: add saa_writeaddr() similar to other locations
Provide saa_writeaddr() to write an integer in x86 format.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
H. Peter Anvin [Sat, 18 Oct 2008 02:29:15 +0000 (19:29 -0700)]
test/Makefile: the elftest objects depend on $(NASM)
If NASM has changed, we logically want to re-run the ELF tests...
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
H. Peter Anvin [Sat, 18 Oct 2008 01:23:29 +0000 (18:23 -0700)]
ELF64: use the RELA addend field instead of relying on the code stream
The x86-64 ABI wants the symbol addend to reside in the addend field
of the RELA relocation, not in the code stream. Apparently it's
something one can get away with, but the linker would still botch it
for some cases. Change it so we pass the proper output and emit zero
into the code stream.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
H. Peter Anvin [Sat, 18 Oct 2008 00:13:26 +0000 (17:13 -0700)]
Test and Makefile rules for 32- and 64-bit ELF shared libraries
Add Makefile rules for the 32-bit ELF shared library test, and add a
64-bit ELF shared library test (still work in progress.)
H. Peter Anvin [Thu, 16 Oct 2008 20:05:09 +0000 (13:05 -0700)]
NASM 2.05rc5
H. Peter Anvin [Thu, 16 Oct 2008 20:03:40 +0000 (13:03 -0700)]
Test for BR 2172659
Test for the bug fix for BR 2172659 (invalid byte-sized immediates.)
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
H. Peter Anvin [Thu, 16 Oct 2008 20:01:43 +0000 (13:01 -0700)]
BR 2172659: Fix incorrect output value for byte operands
A typo in checkin
c1377e9a98dd5ca6f7900c048df5d346d1733d05 caused a
bunch of signed-byte immediates to incorrectly be issued as zero.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
H. Peter Anvin [Wed, 15 Oct 2008 23:18:17 +0000 (16:18 -0700)]
Add reference to %+ from macro parameter concatenation
Add a reference to the %+ operator from the section on macro parameter
concatenation.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
H. Peter Anvin [Wed, 15 Oct 2008 23:14:39 +0000 (16:14 -0700)]
doc: minor editorial change
Use the terms "defined" and "expanded" for single-line macros more
consistently.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
H. Peter Anvin [Wed, 15 Oct 2008 22:23:18 +0000 (15:23 -0700)]
ELF64: fix various GOT relocations
Try to make the various GOT relocations do the right thing in ELF64,
including erring out when appropriate.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
H. Peter Anvin [Wed, 15 Oct 2008 22:22:03 +0000 (15:22 -0700)]
Test for various ELF64 GOT references
Try to test for various GOT references in ELF64.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
H. Peter Anvin [Wed, 15 Oct 2008 18:15:48 +0000 (11:15 -0700)]
doc: add link to the macro packages when talking about them
When discussing the standard macro packages in the context of
__USE_*__ macros, link to them as well as to the %use directive.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
H. Peter Anvin [Mon, 13 Oct 2008 17:17:27 +0000 (10:17 -0700)]
BR 2164053: --prefix _ not --prefix_
The --prefix option takes a separate argument, not an attached
argument.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
H. Peter Anvin [Mon, 13 Oct 2008 04:17:34 +0000 (21:17 -0700)]
NASM 2.05rc4
H. Peter Anvin [Mon, 13 Oct 2008 04:17:04 +0000 (21:17 -0700)]
Document RIP-relative GOT fixes in ELF64
Charles Crayne [Sun, 12 Oct 2008 21:14:45 +0000 (14:14 -0700)]
Fix typo in previous outelf64.c commit
Stray line fragment left in when removing debug code.
Charles Crayne [Sun, 12 Oct 2008 21:00:11 +0000 (14:00 -0700)]
RIP rel relocations for PIC released for testing.
Expressions like
mov r15,[rel integer wrt ..got]
lea rax,[rel integer wrt ..gotoff]
now assemble correctly.
In addition, a fix has been made to the corresponding
abs relocations.
Both of these areas still need additional testing.
H. Peter Anvin [Thu, 9 Oct 2008 22:37:10 +0000 (15:37 -0700)]
assemble.c: use case4() macros like in disasm.c
Use the case4() macros as we already do in disasm.c. It helps reduce
visual clutter, and more clearly demonstrates that groups of four
belong together. Furthermore, it makes the text compact enough that
we can now use case statements to mask down the EA patterns correctly.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
H. Peter Anvin [Thu, 9 Oct 2008 21:15:36 +0000 (14:15 -0700)]
disasm: collapse all the segment register push/pop bytecodes
As far as the disassembler is concerned, the segment register push/pop
bytecodes can be collapsed to a simple expression; the remaining
differences are handled by the filter expressions in insns.pl.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
H. Peter Anvin [Thu, 9 Oct 2008 06:32:33 +0000 (23:32 -0700)]
test/pushseg.asm: add "pop cs"
"pop cs" is an 8086-only opcode; we support it for assembly but not
for disassembly.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
H. Peter Anvin [Thu, 9 Oct 2008 06:30:41 +0000 (23:30 -0700)]
test/pushseg.asm: test for push/pop of segment registers
Simple test for push/pop of segment registers.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
H. Peter Anvin [Thu, 9 Oct 2008 04:17:32 +0000 (21:17 -0700)]
Reshuffle and move the bytecodes for segment register push/pop
Reshuffle the bytecodes for segment register push/pop to make more
sense, and move them from \4 to \344, thus freeing up the single-digit
bytecodes \4..\7 for future use. It doesn't really make sense to use
single-digit bytecodes for this very oddball use.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
H. Peter Anvin [Wed, 8 Oct 2008 23:56:35 +0000 (16:56 -0700)]
Collect statistics on bytecode use in insnsb.c
We are starting to have to worry about running short on available
bytecodes, especially where we encode the operand number in the byte
code. Thus, compile a table of bytecode usage and include as a
comment in insnsb.c.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
H. Peter Anvin [Wed, 8 Oct 2008 23:25:26 +0000 (16:25 -0700)]
NASM 2.05rc3
H. Peter Anvin [Tue, 7 Oct 2008 23:53:49 +0000 (16:53 -0700)]
test/imul.asm: remove obsolete ERROR marker
Error already fixed...
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
H. Peter Anvin [Tue, 7 Oct 2008 18:28:29 +0000 (11:28 -0700)]
Test for various IMUL patterns
Test for IMUL patterns.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
H. Peter Anvin [Tue, 7 Oct 2008 18:26:41 +0000 (11:26 -0700)]
Add missing IMUL pattern: reg64,imm8
Make "imul rax,byte 5" work as expected.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
H. Peter Anvin [Tue, 7 Oct 2008 17:56:32 +0000 (10:56 -0700)]
Add a few missing \15 -> \275 conversions
Add a few \15 -> \275 conversions that had been missed earlier.
Still haven't done the work on IMUL.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
H. Peter Anvin [Tue, 7 Oct 2008 17:53:08 +0000 (10:53 -0700)]
Change \40 class opcodes to \254, except IMUL
Change \40 class opcodes which need to be changed to \254. IMUL will
need a separate audit; I'm not convinced we are really sure what all
the IMUL conditions should be.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
H. Peter Anvin [Tue, 7 Oct 2008 17:05:10 +0000 (10:05 -0700)]
New opcode for 32->64 bit sign-extended immediate with warning
Add a new opcode for 32->64 bit sign-extended immediate, with warning
on the number not matching.
This unfortunately calls for an audit of all the \4[0123] opcodes, if
they should be replaced by \25[4567]. This only replaces one
instruction (MOV reg64,imm32); other instructions need to be
considered.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
H. Peter Anvin [Tue, 7 Oct 2008 16:59:18 +0000 (09:59 -0700)]
test/immwarn.asm: add a few more non-warning tests
A few non-warning conditions.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
H. Peter Anvin [Tue, 7 Oct 2008 16:56:38 +0000 (09:56 -0700)]
Remove is_sbyte64() and replace with is_sbyte32() plus custom warning
is_sbyte64() was equivalent to is_sbyte32() plus the warning; however,
the warning is only used in one place (and conflicts with another
warning there), so remove the function.
Furthermore, add back the test for pure immediates in
possible_sbyte(); they had been broken out but never folded back in --
and are essential.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
H. Peter Anvin [Tue, 7 Oct 2008 06:47:58 +0000 (23:47 -0700)]
Avoid double warning for signed dword immediate
Avoid double warning for the case where a signed dword immediate is
incorrectly extended to 64 bits.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
H. Peter Anvin [Tue, 7 Oct 2008 06:40:31 +0000 (23:40 -0700)]
New opcodes to deal with 8-bit immediate sign extended to opsize
New opcodes to deal with 8-bit immediates which are then sign-extended
to the operand size. These allow us to warn appropriately.
Not sure I'm using these in all the proper places; need audit of all
uses of the \14..\17 opcodes.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
H. Peter Anvin [Tue, 7 Oct 2008 02:16:27 +0000 (19:16 -0700)]
NASM 2.05rc2
H. Peter Anvin [Tue, 7 Oct 2008 02:15:42 +0000 (19:15 -0700)]
changes: document immediate fix
H. Peter Anvin [Tue, 7 Oct 2008 02:11:07 +0000 (19:11 -0700)]
BR 2148448: Fix RIP-relative addressing with an immediate
When there is an immediate in the instruction, a RIP-relative offset
may not be relative to the end of the offset itself, since it is
relative to the end of the *instruction*, not the end of the *offset*.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
H. Peter Anvin [Tue, 7 Oct 2008 01:49:00 +0000 (18:49 -0700)]
immwarn: more immediate warnings test, with notes of where we fail
More tests for immediate warnings, with notes for the ones where we
currently fail to do the right thing.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
H. Peter Anvin [Mon, 6 Oct 2008 02:42:55 +0000 (19:42 -0700)]
Better warnings for out-of-range values
Issue better warnings for out-of-range values. This is not yet
complete.
In particular, note we may have out-of-range for values that end up
being subject to optimization. That is because the optimization takes
place on the *truncated* value, not the pre-truncated value.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
H. Peter Anvin [Tue, 7 Oct 2008 01:27:30 +0000 (18:27 -0700)]
test: change .stdout/.stderr to stdout/stderr
Using hidden files are rather antisocial, and rather pointless in this
particular context. Change .stdout and .stderr to simply stdout and
stderr.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
H. Peter Anvin [Tue, 7 Oct 2008 01:00:13 +0000 (18:00 -0700)]
changes: document CVT fixes.
Document fixes to the CVT instructions.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
H. Peter Anvin [Tue, 7 Oct 2008 00:58:57 +0000 (17:58 -0700)]
BR 2148476: Fix arguments for a bunch of the CVT* instructions
Fix bugs exposed by test for BR 2148476.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
H. Peter Anvin [Tue, 7 Oct 2008 00:57:18 +0000 (17:57 -0700)]
test/br2148476.asm: comprehensive test of the CVT* instructions
Do a best attempt at a comprehensive test of the various CVT* SSE
instructions. This includes the bug of BR 2148476.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
H. Peter Anvin [Mon, 6 Oct 2008 02:41:32 +0000 (19:41 -0700)]
test/immwarn.asm: new test for immediate warnings
Test for various conditions that should or should not generate
immediate warnings.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
H. Peter Anvin [Sun, 5 Oct 2008 05:02:44 +0000 (22:02 -0700)]
test/Makefile: rule to run performtest --diff
Rule to run performtest with the --diff option.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
H. Peter Anvin [Sun, 5 Oct 2008 05:01:42 +0000 (22:01 -0700)]
performtest: use -u with diff
Unified diffs are the only sane option. When calling diff, pass the
-u option.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
H. Peter Anvin [Sun, 5 Oct 2008 04:59:38 +0000 (21:59 -0700)]
test/Makefile: add rules for the automatic tests
Add Makefile rules to run the automatic tests.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
H. Peter Anvin [Sun, 5 Oct 2008 02:02:30 +0000 (19:02 -0700)]
assemble.c: be smarter about when to suppress warnings due to SBYTE
Be smarter and don't suppress warnings due to SBYTE when the SBYTE
didn't actually match.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
H. Peter Anvin [Sun, 5 Oct 2008 01:50:47 +0000 (18:50 -0700)]
assemble.c: do not warn on valid SBYTE optimizations
Do not warn on valid SBYTE optimizations. If we are optimizing and
match one of the SBYTE conditions, do not error out.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
H. Peter Anvin [Wed, 1 Oct 2008 23:08:23 +0000 (16:08 -0700)]
NASM 2.05rc1
H. Peter Anvin [Wed, 1 Oct 2008 17:02:44 +0000 (10:02 -0700)]
doc/changes.src: update
Add information about the recent bug fixes.
Victor van den Elzen [Wed, 1 Oct 2008 11:16:26 +0000 (13:16 +0200)]
Already aligned aligns should be 0 bytes, not %1.
Victor van den Elzen [Wed, 1 Oct 2008 11:08:50 +0000 (13:08 +0200)]
Apply patch from BR 890790
Victor van den Elzen [Wed, 1 Oct 2008 10:18:28 +0000 (12:18 +0200)]
Apply patch from BR 1197827
H. Peter Anvin [Wed, 1 Oct 2008 00:14:54 +0000 (17:14 -0700)]
changes.src: document JMP reg64 fix.
Document the fixed JMP reg64.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
H. Peter Anvin [Wed, 1 Oct 2008 00:12:19 +0000 (17:12 -0700)]
rdsrc.pl: handle tabs in the input
It is just to painful to keep the source files tab-free. Handle tabs
in the input as required.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
H. Peter Anvin [Wed, 1 Oct 2008 00:07:14 +0000 (17:07 -0700)]
doc: remove tab
The documentation processor doesn't like tabs.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
H. Peter Anvin [Wed, 1 Oct 2008 00:01:23 +0000 (17:01 -0700)]
Put the static information about warnings in a structure
Put the static information about warnings in a structure, so one can
see what goes with what. Also, change the sense so "true" means
enabled.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
H. Peter Anvin [Tue, 30 Sep 2008 23:39:17 +0000 (16:39 -0700)]
Allow %warning output to be suppressed
Allow the user to suppress user-specified warnings.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
H. Peter Anvin [Tue, 30 Sep 2008 23:31:06 +0000 (16:31 -0700)]
assemble.c: cleanups
Formatting and some other minor cleanups.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
H. Peter Anvin [Tue, 30 Sep 2008 23:24:47 +0000 (16:24 -0700)]
Document the -O0 and -O1 behaviors.
Document the way the -O0 and -O1 options actually behave. -O0, in
particular, is NASM 0.98 compatibility mode.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Charles Crayne [Tue, 30 Sep 2008 23:11:32 +0000 (16:11 -0700)]
Change behavior of -O0 and -O1 for backward compatibility
-O0: JMP default to NEAR, Jcc/LOOP/JCXZ default to SHORT.
In other words, this is reverting to full-blown 0.98 behavior, not
0.98.39.
-O1: JMP and Jcc default to NEAR, LOOP/JCXZ default to SHORT (only
possible form).
Charles Crayne [Sat, 27 Sep 2008 00:13:09 +0000 (17:13 -0700)]
Document a64 and o64 qualifiers
Add references and index entries for a64 and o64.
H. Peter Anvin [Fri, 26 Sep 2008 06:45:20 +0000 (23:45 -0700)]
Add more 64-bit jump tests
H. Peter Anvin [Fri, 26 Sep 2008 06:42:28 +0000 (23:42 -0700)]
JMP reg64 does not require a REX.W prefix.
We were redundantly emitting a REX.W prefix for JMP reg64.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
H. Peter Anvin [Fri, 26 Sep 2008 00:07:41 +0000 (17:07 -0700)]
NASM 2.04
H. Peter Anvin [Thu, 25 Sep 2008 22:45:06 +0000 (15:45 -0700)]
Set __PASS__ to 3 for preprocess only
When running the preprocessor only, set __PASS__ to 3.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
H. Peter Anvin [Thu, 25 Sep 2008 09:33:24 +0000 (02:33 -0700)]
Clean up unterminated lines
H. Peter Anvin [Thu, 25 Sep 2008 09:31:50 +0000 (02:31 -0700)]
Actually make non-power-of-2 alignments work
We can't use ($$-$) % (%1) since the wraparound will be wrong except
for powers of 2.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
H. Peter Anvin [Thu, 25 Sep 2008 00:39:03 +0000 (17:39 -0700)]
NASM 2.04rc6
H. Peter Anvin [Thu, 25 Sep 2008 00:34:37 +0000 (17:34 -0700)]
Document __PASS__
Document __PASS__, but discourage users from using it.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
H. Peter Anvin [Wed, 24 Sep 2008 17:20:40 +0000 (10:20 -0700)]
Add __PASS__ builtin macro
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>
H. Peter Anvin [Wed, 24 Sep 2008 16:14:49 +0000 (09:14 -0700)]
Unbreak %warning
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>
H. Peter Anvin [Wed, 24 Sep 2008 15:59:29 +0000 (08:59 -0700)]
doc/changes.src: something closer to final release notes for 2.04
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.