Commit Graph

31 Commits

Author SHA1 Message Date
H. Peter Anvin
7e50d232ba Make the macros table "unsigned char"
It gets less ugly if we make the macros table "unsigned char".
2008-06-25 14:54:14 -07:00
H. Peter Anvin
cda816306d Drop the index tables from the canned macros
Instead of an array of strings, just have a character array; that
reduces the size of canned macros by up to 30%, and we only did
sequential access anyway.
2008-06-21 15:15:40 -07:00
H. Peter Anvin
cfb7176ca2 Move the output format macros into the macros.pl mechanism
Move the handling of "extra" macros (i.e. output format macros) into
the macros.pl mechanism.  This allows us to change the format of the
internal macro store in the future - e.g. to a single byte store
without redundant pointers.

Also, stop using indicies into a long array when there is no good
reason to not just use different arrays.
2008-06-20 15:20:16 -07:00
H. Peter Anvin
b2a5fda157 Somewhat more clever way to generate the %use guard macros
Automatically generate a %define as the first string in the include
block, and just pick the string out of it from that %define statement
to verify existence.  That way we eliminate any use of toupper() --
all case-insensitivity in NASM uses tolower()/nasm_tolower().
2008-06-19 21:42:42 -07:00
H. Peter Anvin
926fc40b65 %use: call these directives "standard macro packages"
Adopt the term "standard macro packages", "modules" are too
ambiguous.
2008-06-19 16:26:12 -07:00
H. Peter Anvin
435d55b344 macros.pl: need to use $' to get proper left-to-right behaviour
Using ^(.*) means we do right-to-left search, since (.*) is a greedy
expression; instead use $' to get the lead-in part of the string.
2008-06-19 16:17:41 -07:00
H. Peter Anvin
e21ede9c76 macros.pl: remove debug prints; improve compression regex
Remove debug print statements from macros.pl
Make sure we test for whitespace at end of statements
2008-06-19 16:12:20 -07:00
H. Peter Anvin
72edbb87ef macros.c: compress by tokenizing macro directives
Compress macros.c by representing macro directives with a single byte.
We can do this because we only use the ASCII character range inside
the standard macro files.

Note: we could save significant additional space by not having a
pointer array, and instead relying on the fact that we sweep
sequentially through the output array.
2008-06-19 16:00:04 -07:00
H. Peter Anvin
d2456590fc preproc: add support for builtin include modules (%use)
Add a builtin equivalent to the %include directive called %use.
%use includes a standard macro file compiled into the binary; these
come from the macros/ directory in the source code.

The idea here is to be able to provide optional macro packages with
the distribution, without adding complex host filesystem dependencies.
2008-06-19 15:04:18 -07:00
H. Peter Anvin
a0b91037e2 Mark Perl scripts executable
Be consistent about marking Perl scripts executable, even if we always
invoke them with $(PERL) in the Makefiles.
2008-06-15 16:55:39 -07:00
H. Peter Anvin
ba5224d096 macros.pl: more readable comments 2008-05-26 11:39:00 -07:00
H. Peter Anvin
d2ff0ea5d5 Add some comments to the output of macros.pl
Add some comments to the output of macros.pl, which might make it a
little bit easier to debug issues if there should be any.
2008-05-26 11:21:25 -07:00
H. Peter Anvin
a4835d466c Avoid #including .c files; instead compile as separate units
Don't #include .c files, even if they are auto-generated; instead
compile them as separate compilation units and let the linker do its
job.
2008-05-20 14:21:29 -07:00
H. Peter Anvin
188ce76c46 Constipate the stdmac[] array. 2008-02-16 13:58:45 -08:00
Beroset
095e6a2973 regularized spelling of license to match name of LICENSE file 2007-12-29 09:44:23 -05:00
H. Peter Anvin
7065309739 Formatting: kill off "stealth whitespace"
"Stealth whitespace" makes it harder to read diffs, and just generally
cause unwanted weirdness.  Do a source-wide pass to get rid of it.
2007-10-19 14:42:29 -07:00
H. Peter Anvin
fe501957c0 Portability fixes
Concentrate compiler dependencies to compiler.h; make sure compiler.h
is included first in every .c file (since some prototypes may depend
on the presence of feature request macros.)

Actually use the conditional inclusion of various functions (totally
broken in previous releases.)
2007-10-02 21:53:51 -07:00
Keith Kanios
a6dfa78b78 Fixed distinction between char and int8_t data types. 2007-04-13 16:47:53 +00:00
Keith Kanios
b7a89544d0 General push for x86-64 support, dubbed 0.99.00. 2007-04-12 02:40:54 +00:00
H. Peter Anvin
45e3da6440 Fix a couple of perl4-isms that are now illegal 2002-05-19 01:51:00 +00:00
Frank Kotler
42e89b00a2 uncomment "use strict" in macros.pl 2002-05-18 07:28:31 +00:00
H. Peter Anvin
0a7a3b459c Change "const static" -> "static const" to keep gcc happy 2002-05-14 23:54:46 +00:00
H. Peter Anvin
310b3e165f Code cleanup fixes from Ed Beroset 2002-05-14 22:38:55 +00:00
H. Peter Anvin
e87613b14e Make all version information come from the single file "version".
Introduce new standard __NASM_SUBMINOR__ and __NASM_VER__ macros.
2002-05-04 03:57:52 +00:00
H. Peter Anvin
8ac364139a NASM 0.98.30 2002-04-30 21:09:12 +00:00
H. Peter Anvin
785ec1d973 NASM 0.98.18 2002-04-30 21:04:43 +00:00
H. Peter Anvin
788e6c10e1 NASM 0.98.12 2002-04-30 21:02:01 +00:00
H. Peter Anvin
4cf1748e68 NASM 0.98.11 2002-04-30 21:01:38 +00:00
H. Peter Anvin
734b188090 NASM 0.98.09 2002-04-30 21:01:08 +00:00
H. Peter Anvin
76690a12ad NASM 0.96 2002-04-30 20:52:49 +00:00
H. Peter Anvin
6768eb71d8 NASM 0.95 2002-04-30 20:52:26 +00:00