H. Peter Anvin [Sun, 15 Jun 2008 23:18:43 +0000 (16:18 -0700)]
Update Mkfiles/*.mak
Sync the file list in Mkfiles/*.mak
H. Peter Anvin [Sun, 15 Jun 2008 04:37:46 +0000 (21:37 -0700)]
CHANGES: Document new features
H. Peter Anvin [Sun, 15 Jun 2008 04:36:56 +0000 (21:36 -0700)]
Merge branch 'nasm-2.03.x'
H. Peter Anvin [Sun, 15 Jun 2008 04:36:18 +0000 (21:36 -0700)]
CHANGES: document changes from nasm-2.03
H. Peter Anvin [Sun, 15 Jun 2008 04:23:39 +0000 (21:23 -0700)]
doc: Add Unicode Strings to Unicode index
H. Peter Anvin [Sun, 15 Jun 2008 04:21:17 +0000 (21:21 -0700)]
Document __utf16__ and __utf32__
H. Peter Anvin [Sun, 15 Jun 2008 04:10:21 +0000 (21:10 -0700)]
Merge branch 'nasm-2.03.x'
H. Peter Anvin [Sun, 15 Jun 2008 04:09:39 +0000 (21:09 -0700)]
quote: fix termination condition for hexadecimal escapes
Fix reversed test for hexadecimal escape sequence termination.
H. Peter Anvin [Sun, 15 Jun 2008 04:08:38 +0000 (21:08 -0700)]
Support __utf16__ and __utf32__ in an expression context
Support __utf16__ and __utf32__ in expression contexts.
H. Peter Anvin [Sun, 15 Jun 2008 04:07:09 +0000 (21:07 -0700)]
strfunc: fix UTF-8 mid-character limit
H. Peter Anvin [Sun, 15 Jun 2008 03:53:45 +0000 (20:53 -0700)]
strfunc: always null-terminate the output buffer
Make sure that the buffer is always null-terminated, even though we do
have to use the length, since the string can (and often will) have
embedded nulls.
H. Peter Anvin [Sat, 14 Jun 2008 23:53:48 +0000 (16:53 -0700)]
Implement __utf16__() and __utf32__() for the DB family
Implement __utf16__() and __utf32__() for the DB family of
pseudo-instructions. Not yet implemented for evaluation context.
H. Peter Anvin [Sat, 14 Jun 2008 19:09:25 +0000 (12:09 -0700)]
doc: add a couple of stylistic alternatives
Add a few alternate font sets for the documentation. I would be
interested to see if anyone thinks they are better.
H. Peter Anvin [Thu, 12 Jun 2008 16:33:32 +0000 (09:33 -0700)]
Merge branch 'nasm-2.03.x'
H. Peter Anvin [Thu, 12 Jun 2008 16:31:19 +0000 (09:31 -0700)]
Fix overflow in listing.c (BR 1991797)
Fix a buffer overflow in listing.c (BR 1991797).
Putting this on the nasm-2.03.x branch as a potential candidate for a
patch release.
H. Peter Anvin [Thu, 12 Jun 2008 04:09:22 +0000 (21:09 -0700)]
doc: Nasm -> NASM
Consistently write NASM in all capitals
H. Peter Anvin [Thu, 12 Jun 2008 01:52:54 +0000 (18:52 -0700)]
doc: title capitalization
H. Peter Anvin [Thu, 12 Jun 2008 01:51:14 +0000 (18:51 -0700)]
doc: add missing period.
H. Peter Anvin [Thu, 12 Jun 2008 01:50:41 +0000 (18:50 -0700)]
doc: remove obsolete note.
H. Peter Anvin [Thu, 12 Jun 2008 01:38:15 +0000 (18:38 -0700)]
doc: Makefile fixes missing from previous checkin
H. Peter Anvin [Thu, 12 Jun 2008 01:32:33 +0000 (18:32 -0700)]
doc: another case of the RTF backend corrupting state
Another case of the RTF backend corrupting global state. "Fix" it by
only outputting one format at a time; this also makes it possible to
run in parallel.
H. Peter Anvin [Thu, 12 Jun 2008 01:23:14 +0000 (18:23 -0700)]
doc: ps/pdf: set page numbers in normal-sized italic
Set page numbers in normal-sized italic, instead of large and bold.
We might want to consider using bold italic, but I think this is just
fine.
H. Peter Anvin [Thu, 12 Jun 2008 01:14:24 +0000 (18:14 -0700)]
doc: Add NASMENV to the index (BR 1917084)
Add NASMENV to the documentation index.
H. Peter Anvin [Thu, 12 Jun 2008 01:09:02 +0000 (18:09 -0700)]
ps/pdf doc: default to 10-point font, wider leading
Switch the main font to 10 points Times Roman, but leave the leading
at 11 points. This produces, in my opinion, a much more legible and
printable document.
H. Peter Anvin [Thu, 12 Jun 2008 01:07:40 +0000 (18:07 -0700)]
Make -F imply -g (BR 1991213)
When the user specifies -F, imply the -g option. Too many users seem
to make this mistake.
Charles Crayne [Wed, 11 Jun 2008 23:15:01 +0000 (16:15 -0700)]
Correct X86_64 reference in dwarf support message
H. Peter Anvin [Wed, 11 Jun 2008 22:49:41 +0000 (15:49 -0700)]
Use an explicit table for tolower() to avoid a function call
On some platforms, tolower() is implemented as a function call, in
order to handle locale support. We never change locales, so can the
result of tolower() into a table, so we don't have to sit through the
function call every time.
~1.3% overall performance improvement on a macro-heavy benchmark under
Linux x86-64.
H. Peter Anvin [Wed, 11 Jun 2008 01:29:11 +0000 (18:29 -0700)]
Remove expand_macros_in_string()
Remove the now-unused expand_macros_in_string() function.
H. Peter Anvin [Wed, 11 Jun 2008 01:27:38 +0000 (18:27 -0700)]
Add %warning, saner unquoting of %error
- Add %warning directive
- Only unquote an %error or %warning string if it is the only thing on
the directive line.
- Don't expand macros inside a quoted string, even for %error.
H. Peter Anvin [Tue, 10 Jun 2008 21:44:09 +0000 (14:44 -0700)]
nasmlib.c: fwriteint*() only need WORDS_LITTLEENDIAN
fwriteint*() don't require unaligned references, so they can be
optimized for WORDS_LITTLEENDIAN rather than X86_MEMORY...
H. Peter Anvin [Tue, 10 Jun 2008 21:41:43 +0000 (14:41 -0700)]
Fix typo: s/most/least/
Littleendian = least signficant byte first
H. Peter Anvin [Tue, 10 Jun 2008 20:00:27 +0000 (13:00 -0700)]
Make it possible to use "inline" and "restrict"
Put the appropriate machinery in place to be able to use the "inline"
and "restrict" keywords with appropriate semantics.
H. Peter Anvin [Tue, 10 Jun 2008 16:35:26 +0000 (09:35 -0700)]
Introduce likely/unlikely macros, use them in saa.c
Introduce the likely() and unlikely() macros, as used in Linux.
They are compiler-dependent hints that a particular boolean expression
is likely to be true or false, respectively.
Currently only implemented for gcc.
H. Peter Anvin [Tue, 10 Jun 2008 16:31:31 +0000 (09:31 -0700)]
SAA: optimize all power-of-two lengths
We can actually use the shift optimization whenever blk_len ==
SAA_BLKLEN, which will be true for all powers of two.
H. Peter Anvin [Tue, 10 Jun 2008 16:29:20 +0000 (09:29 -0700)]
SAA: optimize seeks when used on a byte array
In practice, we only ever use the seeking functions on byte arrays
(elem_len == 1). Optimize for that case, to avoid a general divmod
operation.
H. Peter Anvin [Tue, 10 Jun 2008 03:45:19 +0000 (20:45 -0700)]
Make strings a first-class token type; defer evaluation
Make strings a proper, first-class token type, instead of relying on
the "TOKEN_NUM with tv_charptr" hack. Only convert a string to a
number if requested in an expression context; this also makes it
possible to actually issue a warning when it overflows.
H. Peter Anvin [Tue, 10 Jun 2008 00:40:16 +0000 (17:40 -0700)]
Move all the RAA code out of nasmlib
The RAA code doesn't have to be in nasmlib; it is only used by nasm
itself, and is better handled in a separate module.
H. Peter Anvin [Tue, 10 Jun 2008 00:35:33 +0000 (17:35 -0700)]
saa.h doesn't need nasmlib.h
We don't have to include nasmlib.h in saa.h
H. Peter Anvin [Tue, 10 Jun 2008 00:32:43 +0000 (17:32 -0700)]
Move all the SAA code out of nasmlib
Move all the SAA code out of nasmlib; it's not used by anything than
nasm itself. Cleaning out the kitchen sink known as nasmlib is a good
thing, too.
H. Peter Anvin [Mon, 9 Jun 2008 17:21:18 +0000 (10:21 -0700)]
Merge branch 'nasm-2.03.x'
H. Peter Anvin [Mon, 9 Jun 2008 17:18:45 +0000 (10:18 -0700)]
Fix %? in multi-line macros with a label
The handling of %? in multi-line macros was broken when the macro name
was preceeded by a label; it would expand to the label instead of the
macro name. This was particularly serious since this was used in
the macro implementation of INCBIN.
H. Peter Anvin [Mon, 9 Jun 2008 04:15:01 +0000 (21:15 -0700)]
Replace the WSAA macros with functions
Change the WSAA macros into functions; reducing the icache footprint.
H. Peter Anvin [Mon, 9 Jun 2008 03:53:29 +0000 (20:53 -0700)]
Use autoconf to detect WORDS_LITTLEENDIAN
Use autoconf to detect littleendian word order, and use
WORDS_LITTLEENDIAN instead of X86_MEMORY when we don't require
unaligned memory accesses to be permitted.
H. Peter Anvin [Mon, 9 Jun 2008 01:39:55 +0000 (18:39 -0700)]
WSAA: make the WSAA macros contain their own buffer
Make the WSAA macros contain their own buffer definitions. This
eliminates the need to have a separate "workbuf" declared in the
outelf backends, which isn't even used for anything else, except for a
few completely redundant strcpys.
Note: these macros probably should be replaced with actual
functions. The overhead of the function call is likely to be more
than offset by lower icache footprint.
H. Peter Anvin [Mon, 9 Jun 2008 00:02:57 +0000 (17:02 -0700)]
NASM 2.03
H. Peter Anvin [Sun, 8 Jun 2008 23:55:15 +0000 (16:55 -0700)]
doc: Fix title "String Constants"
Cut & paste oops...
H. Peter Anvin [Sun, 8 Jun 2008 23:54:03 +0000 (16:54 -0700)]
doc: Index Unicode and UTF-8
Add Unicode and UTF-8 to the index
H. Peter Anvin [Sun, 8 Jun 2008 23:50:23 +0000 (16:50 -0700)]
doc: \t is also a supported escape sequence...
H. Peter Anvin [Sun, 8 Jun 2008 23:49:16 +0000 (16:49 -0700)]
doc: s/by/in/ certain preprocessor directives.
H. Peter Anvin [Sun, 8 Jun 2008 23:46:37 +0000 (16:46 -0700)]
Split documentation on string syntax out of "character constants"
Split the documentation on string syntax, as a lexical entity, out of
the section about character constants. It was confusing to have
discussion that apply more to string constants than character
constants, and they use the same syntax anyway.
H. Peter Anvin [Sun, 8 Jun 2008 23:39:28 +0000 (16:39 -0700)]
doc: A few floating-point examples
H. Peter Anvin [Sun, 8 Jun 2008 23:35:45 +0000 (16:35 -0700)]
doc: add a comma
This time the comma should actually be there.
H. Peter Anvin [Sun, 8 Jun 2008 23:34:44 +0000 (16:34 -0700)]
doc: ALL %if constructs have %elif/%ifn/%elifn variants.
All %if constructs now have %elif/%ifn/%elifn; this is hard-coded into
the preprocessor.
H. Peter Anvin [Sun, 8 Jun 2008 23:25:20 +0000 (16:25 -0700)]
doc: remove superfluous comma
H. Peter Anvin [Sun, 8 Jun 2008 23:24:06 +0000 (16:24 -0700)]
Improve the %iftoken example
H. Peter Anvin [Sun, 8 Jun 2008 23:20:26 +0000 (16:20 -0700)]
Fix capitalization in titles
H. Peter Anvin [Sun, 8 Jun 2008 23:06:22 +0000 (16:06 -0700)]
Document forward references fixed in EQU.
Frank Kotler [Sun, 8 Jun 2008 07:06:30 +0000 (03:06 -0400)]
Document __OUTPUT_FORMAT__
It may be "too late" for this to get into 2.03, but I've been whining
that "__OUTPUT_FORMAT__" ought to be documented. Maybe...
H. Peter Anvin [Fri, 6 Jun 2008 17:40:32 +0000 (10:40 -0700)]
NASM 2.03rc8
H. Peter Anvin [Fri, 6 Jun 2008 17:38:46 +0000 (10:38 -0700)]
Fix dependency list generation
The dependency list tail pointer wasn't actually updated correctly.
Fix that. We may want to make this a structure of some sort to make
the code a bit cleaner, but this seems to be the cleanest hack for
now.
H. Peter Anvin [Thu, 5 Jun 2008 23:25:21 +0000 (16:25 -0700)]
NASM 2.03rc7
H. Peter Anvin [Thu, 5 Jun 2008 23:24:28 +0000 (16:24 -0700)]
Merge branch 'master' of git+ssh://repo.or.cz/srv/git/nasm
H. Peter Anvin [Thu, 5 Jun 2008 23:23:35 +0000 (16:23 -0700)]
The XSAVE group are SSE-spefix-sensitive
The XSAVE group are SSE-prefix-sensitive (null prefix), and therefore
take the \360 flag.
Charles Crayne [Thu, 5 Jun 2008 23:13:06 +0000 (16:13 -0700)]
Merge branch 'master' of git+ssh://ccrayne@repo.or.cz/srv/git/nasm
Charles Crayne [Thu, 5 Jun 2008 23:12:06 +0000 (16:12 -0700)]
Avoid obscure segfault in DWARF generation
If DWARF debugging info is requested, and no section
is marked executable, output empty debug sections,
instead of allowing assembler to segfault.
H. Peter Anvin [Thu, 5 Jun 2008 19:28:00 +0000 (12:28 -0700)]
insnsd.c: don't generate an inaccessible table
Some pseudo-instructions (RESB and EQU) seem to make it into the
instruction table. This also generates an instruction table for
zero-length instructions, which of course can never actually be
accessed. Quiet a compiler warning by simply not emitting this
useless table. Ideally we shouldn't emit the pseudo-instructions
either, but that is a bigger change, and it's hardly a lot of memory
involved.
H. Peter Anvin [Thu, 5 Jun 2008 19:14:39 +0000 (12:14 -0700)]
NASM 2.03rc6
H. Peter Anvin [Thu, 5 Jun 2008 00:24:35 +0000 (17:24 -0700)]
doc: Remove superfluous comma.
H. Peter Anvin [Thu, 5 Jun 2008 00:23:14 +0000 (17:23 -0700)]
Add %defstr, %idefstr
Add %defstr and %idefstr, to define a macro as a quoted string.
Charles Crayne [Wed, 4 Jun 2008 23:05:14 +0000 (16:05 -0700)]
Merge branch 'master' of git+ssh://ccrayne@repo.or.cz/srv/git/nasm
Charles Crayne [Wed, 4 Jun 2008 22:53:21 +0000 (15:53 -0700)]
Remove EQU for critical expression list
Allow redefine_label to update segment as well as offset,
thereby fixing bug which required EQU to be on the
critical expression list.
H. Peter Anvin [Wed, 4 Jun 2008 22:13:02 +0000 (15:13 -0700)]
NASM 2.03rc5
H. Peter Anvin [Wed, 4 Jun 2008 22:11:23 +0000 (15:11 -0700)]
Fix double free in %depend
H. Peter Anvin [Wed, 4 Jun 2008 18:26:59 +0000 (11:26 -0700)]
Fix memory management issues with expanded %include
Ownership of the filename string was a bit fuzzy, with the result that
we were freeing it even though it was retained for use by __FILE__.
Clean up a number of other memory management issues with the new
quoting code, and change the stdscan implementation to one pass over
the string.
H. Peter Anvin [Wed, 4 Jun 2008 15:58:53 +0000 (08:58 -0700)]
Update .gitignore, remove bogus dependency
H. Peter Anvin [Wed, 4 Jun 2008 15:49:10 +0000 (08:49 -0700)]
Makefile/dependency updates
Add quote.c to all the auxiliary Makefiles, and run "make alldeps".
H. Peter Anvin [Tue, 3 Jun 2008 01:32:01 +0000 (18:32 -0700)]
doc: Remove "what's new" since it is out of date
H. Peter Anvin [Mon, 2 Jun 2008 20:59:09 +0000 (13:59 -0700)]
quote: Change the definition of escp
Semi-arbitrary change of the definition of escp to the beginning of
the argument sequence instead of the initiator character. This may
avoid an add in some code paths, and looks slightly cleaner to me.
H. Peter Anvin [Mon, 2 Jun 2008 17:38:54 +0000 (10:38 -0700)]
quote: be consistent in not using C escapes for bytes
We used numbers in nasm_unquote and C escapes in nasm_quote - use
numbers in both places, just in case some C compiler does something
weird with '\r' and (especially) '\n'.
H. Peter Anvin [Mon, 2 Jun 2008 17:02:36 +0000 (10:02 -0700)]
nasm_unquote: make code a little more uniform
Make the code a bit more consistent:
- ndig is now always a countdown, and we always to the (p > escp+1)
test to see if we got anything at all (this is to deal with stuff
like \x without a digit.)
- Add missing break; after 'v' (bug!).
- Preinitialize nval to zero.
H. Peter Anvin [Mon, 2 Jun 2008 16:57:46 +0000 (09:57 -0700)]
quote: massively simplify nasm_skip_string()
Greatly simplify nasm_skip_string() by observing that for the purpose
of string skipping, all states other than st_backslash are equivalent
to st_start.
H. Peter Anvin [Mon, 2 Jun 2008 06:00:23 +0000 (23:00 -0700)]
Document UTF-8 conversion better, use "byte" instead of "ASCII"
ASCII specifically refers to characters <= 127, so to use "ASCII" for
literal bytes is really confusing in a multibyte environment. Give an
example of using Unicode escapes.
H. Peter Anvin [Mon, 2 Jun 2008 05:53:15 +0000 (22:53 -0700)]
Document that underscores in numbers is permitted.
H. Peter Anvin [Mon, 2 Jun 2008 05:37:32 +0000 (22:37 -0700)]
NASM 2.03rc4
H. Peter Anvin [Mon, 2 Jun 2008 05:36:56 +0000 (22:36 -0700)]
Update CHANGES
H. Peter Anvin [Mon, 2 Jun 2008 05:35:47 +0000 (22:35 -0700)]
nasmdoc: document %substr, `...`
H. Peter Anvin [Mon, 2 Jun 2008 05:34:55 +0000 (22:34 -0700)]
Fix bug where the WinHelp backend corrupts the internal data
WinHelp/RTF needs to convert \ to \\, but did so on the global data,
so the DIP output was corrupted.
H. Peter Anvin [Mon, 2 Jun 2008 04:43:03 +0000 (21:43 -0700)]
qstring: fix unquoting in %pathsearch directive
%pathsearch unquoting should be done on the "t" token, not on the
"tline" token...
H. Peter Anvin [Mon, 2 Jun 2008 04:34:49 +0000 (21:34 -0700)]
qstring: backquoted strings seem to work now...
Hopefully backquoted strings should work correctly now.
H. Peter Anvin [Mon, 2 Jun 2008 00:23:51 +0000 (17:23 -0700)]
qstring: first cut at full quoted string support in the preprocessor
First attempt at properly handle quoted strings in the preprocessor.
This also adds range support in %substr.
No support in the assembler yet.
H. Peter Anvin [Sun, 1 Jun 2008 23:07:48 +0000 (16:07 -0700)]
qstring: add nasm_unquote() supporting `...`
Add a nasm_unquote() function supporting the intended `...` syntax.
H. Peter Anvin [Fri, 30 May 2008 21:32:16 +0000 (14:32 -0700)]
doc: Single section for all the date/time macros
Move all the date/time macros to a common section so we can give a
common example. We don't have support for a fourth level of headers,
so just use a bulleted list.
H. Peter Anvin [Fri, 30 May 2008 21:11:40 +0000 (14:11 -0700)]
doc: fix __UTC_DATE__ and __UTC_TIME__ description
H. Peter Anvin [Fri, 30 May 2008 18:31:35 +0000 (11:31 -0700)]
incbin: use the macro name itself as context name
Use the macro name itself as the context name, this is consistent with
other standard macros.
H. Peter Anvin [Fri, 30 May 2008 18:08:14 +0000 (11:08 -0700)]
Update CHANGES
H. Peter Anvin [Fri, 30 May 2008 18:06:28 +0000 (11:06 -0700)]
Add missing %rotate directive to the FLOAT macro.
H. Peter Anvin [Fri, 30 May 2008 18:04:07 +0000 (11:04 -0700)]
incbin definition: use %?
H. Peter Anvin [Fri, 30 May 2008 18:03:56 +0000 (11:03 -0700)]
Document %pathsearch and %depend
H. Peter Anvin [Fri, 30 May 2008 17:42:30 +0000 (10:42 -0700)]
Introduce %depend and %pathsearch, and make incbin a macro
Introduce new preprocessor directives %depend and %pathsearch, and
make incbin a standard macro using these filenames. This lets us
remove the code that makes incbin search the path.
H. Peter Anvin [Fri, 30 May 2008 17:26:28 +0000 (10:26 -0700)]
stdscan.c: clarify comment
There is a reason rn_warn isn't checked in this particular case...