Commit Graph

236 Commits

Author SHA1 Message Date
H. Peter Anvin
386866a345 Add version.make to PERLREQ
version.make is produced by a Perl script, and therefore should be in
PERLREQ.
2008-07-05 17:45:01 -07:00
H. Peter Anvin
7b5aad8498 Run "make alldeps" 2008-06-21 18:19:13 -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
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
c0d6066d99 syncfiles: use #-- ... --# for consistency with mkdep.pl
mkdep.pl already used #-- ... --# (two dashes) whereas syncfiles.pl
was using #--- ... ---# (three dashes).  Change syncfiles.pl to match
mkdep.pl.
2008-06-15 23:50:50 -07:00
H. Peter Anvin
7806e96508 Script to automagically synchronize the object file lists
Add a script to automagically synchronize the list of object files
between the various Makefiles.
2008-06-15 16:54:29 -07:00
H. Peter Anvin
518df30308 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.
2008-06-14 16:53:48 -07:00
H. Peter Anvin
fcb8909749 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.
2008-06-09 17:40:16 -07:00
H. Peter Anvin
1803dedae8 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.
2008-06-09 17:32:43 -07:00
H. Peter Anvin
c735d1a6b2 Replace the WSAA macros with functions
Change the WSAA macros into functions; reducing the icache footprint.
2008-06-08 21:15:01 -07:00
H. Peter Anvin
0eebf799db Update .gitignore, remove bogus dependency 2008-06-04 08:58:53 -07:00
H. Peter Anvin
3bc3c934d9 Makefile/dependency updates
Add quote.c to all the auxiliary Makefiles, and run "make alldeps".
2008-06-04 08:49:10 -07:00
H. Peter Anvin
8cad14bbcf 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.
2008-06-01 17:23:51 -07:00
H. Peter Anvin
ad42e0d1fb make alldeps 2008-05-27 14:34:53 -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
2c94c44f35 Make insnsb.c an actual compilation unit
"make alldeps" doesn't really like it when included files end in *.c.
Instead of renaming insnsb.c to insnsb.h, make it an actual
compilation unit, since there really isn't any reason for it not to
be.
2008-05-13 14:29:47 -07:00
H. Peter Anvin
3720f7beae Generate a byte array instead of using strings for the byte codes
Generate a byte array instead of using C compiler strings for the byte
codes.  This has a few advantages:

- No need to special-case zero due to broken C compilers.
- Only insns.pl only ever reads the string, so we can invent our own
  syntax.
- Compaction.
- We can give it the proper, unsigned type.
2008-05-12 11:00:50 -07:00
H. Peter Anvin
72ec0e4144 Temporaries in macros need a unique prefix; WSAA*() macros to header
When using temporaries in macros, given them a unique prefix to avoid
namespace collisions when using one macro inside another.

Move the WSAA*() macros from outelf32/outelf64 to a separate header
file.
2008-04-10 14:56:09 -07:00
Beroset
095e6a2973 regularized spelling of license to match name of LICENSE file 2007-12-29 09:44:23 -05:00
H. Peter Anvin
23f1644ba9 Run "make alldeps" 2007-10-30 01:13:27 -07:00
Charles Crayne
f3eea3d539 Suppress datarootdir warnings from configure 2007-10-18 23:33:06 -07:00
H. Peter Anvin
4d13bdc72f make alldeps 2007-10-02 21:57:27 -07:00
H. Peter Anvin
4a8daf0607 Run "make alldeps".
Run "make alldeps".  This stuff probably shouldn't be checked in...
2007-10-02 21:13:18 -07:00
H. Peter Anvin
304b605563 Add substitutes for snprintf() and vsnprintf()
To deal with fools^Wpeople trying to keep really old systems alive,
create a proper framework for substitution functions, and make it
possible to deal with the lack of snprintf/vsnprintf in particular.
2007-09-28 10:50:20 -07:00
H. Peter Anvin
f3748bbad0 Makefile.in: make "make install" create directories
Make "make install" create directories if they don't already exist.
2007-09-25 13:34:55 -07:00
H. Peter Anvin
dc467ba8af Support __float*__ for floating-point numbers in expressions
Add special operators to allow the use of floating-point constants in
contexts other than DW/DD/DQ/DT/DO.

As part of this checkin, make MAX_KEYWORD generated by tokhash.pl,
since it knows what all the keywords are so it can tell which one is
the longest.
2007-09-24 12:30:54 -07:00
H. Peter Anvin
9b8f0ad113 Update nasm.spec.in and make it handle rc releases
Update nasm.spec.in to match modern conventions, and make it handle rc
releases by using the "mangled" version of the name (1.99.99.91
instead of 2.0rc1).
2007-09-22 16:35:11 -07:00
H. Peter Anvin
87f252aaa5 Make nasm_malloc() et al available from inside ndisasm
Clean up nasmlib to remove functions irrelevant for ndisasm; make
nasm_malloc() etc usable inside ndisasm.
2007-09-19 21:40:37 -07:00
H. Peter Anvin
3a7edd73a3 Sort dependency lists
Sort the dependency lists generated by "mkdep.pl", to make sure that
re-running "make alldeps" doesn't change anything unless there has
been real dependency changes.  The previous version could produce
different output between runs and across platforms.
2007-09-17 13:56:26 -07:00
H. Peter Anvin
b8af9aa522 Cleaner way to handle MSVC's _snprintf() underscore damage
Some versions of MSVC have snprintf() and vsnprintf() only with a
leading underscore.  Handle that a bit more cleanly.
2007-09-17 13:53:14 -07:00
H. Peter Anvin
39afbce9d4 make alldeps: change Mkfiles/Makefile.* to Mkfiles/*.mak
The previous checkin switched to the naming scheme *.mak to be able to
be more descriptive.  Thus, change "make alldeps" accordingly.
2007-09-16 22:17:29 -07:00
H. Peter Anvin
9e8e948f86 Run "make alldeps" 2007-09-16 18:35:02 -07:00
H. Peter Anvin
6244f4b5b9 Use the new hash table function library to store labels
Use the new hash table function library to store labels.  When
compiling on my 64-bit system, it reduces the assembly time for the
output of test/perf/label.pl from 73 to 7 seconds.
2007-09-14 18:03:29 -07:00
H. Peter Anvin
d105682096 Remove $Id$ tags (useless with git)
Remove CVS $Id$ tags, since git doesn't use them.
2007-09-12 21:05:06 -07:00
H. Peter Anvin
16b0a33cea Use enumerations where practical to ease debugging
We have a lot of enumerations; by declaring fields as such, we make it
easier when debugging, since the debugger can display the enumerations
in cleartext.  However, make sure exceptional values (like -1) are
included in the enumeration, since the compiler otherwise may not
include it in the valid range of the enumeration.
2007-09-12 20:27:41 -07:00
H. Peter Anvin
9e1c202b69 Run "make alldeps"; add dependencies missing from the previous checkin
It helps to run "make alldeps" when the changes are actually complete...
2007-09-12 01:34:19 +00:00
H. Peter Anvin
4169a47bd9 Use a perfect hash to look up preprocessor directives
Use a perfect hash to look up preprocessor directives, and generate
the preprocessor directive list automatically.
2007-09-12 01:29:43 +00:00
H. Peter Anvin
52e30171ee Fix "make tar"; useful for RPM testing 2007-09-05 06:40:51 +00:00
H. Peter Anvin
da51fc9dac Remove obsolete Serial: construct; we shouldn't need it anyway. 2007-09-05 06:24:43 +00:00
H. Peter Anvin
fb5a599c8a phash.ph: use a bipartite graph to reduce the storage requirements
Since we fold the f- and g-functions together, if we guarantee that g is
bipartite, we can make g twice the size of f without cost.  This greatly
improves the odds of generating a smaller hash.
2007-08-30 23:42:39 +00:00
H. Peter Anvin
74cc5e569c Finishing touches on perfect hash tokenizer; actually turn the thing on
Finish the perfect hash tokenizer, and actually enable it.

Move stdscan() et al to a separate file, since it's not needed in any
of the clients of nasmlib other than nasm itself.

Run make alldeps.
2007-08-30 22:35:34 +00:00
H. Peter Anvin
b1dabe44ac Makefile rule for tokhash.c 2007-08-30 21:50:20 +00:00
H. Peter Anvin
16a76654b8 Create a Perl library directory, and add the Graph module to it
Graph-0.84 from CPAN
2007-08-29 17:20:09 +00:00
H. Peter Anvin
52daec56f9 Detect missing <inttypes.h> and include ersatz version if missing 2007-06-21 19:00:12 +00:00
H. Peter Anvin
ff69805feb Update dependencies. 2007-05-30 18:30:18 +00:00
H. Peter Anvin
7a83374a9c Run "make alldeps" 2007-05-29 21:44:55 +00:00
Chuck Crayne
26d3de3217 Initial support for ELF64 2007-04-28 06:18:48 +00:00
H. Peter Anvin
2b8f5d2b80 Remove @GCCFLAGS@
Remove the now obsolete @GCCFLAGS@.
2007-04-15 23:10:26 +00:00
Eric Christopher
8e5abdeeb9 Allow CFLAGS to be overridden from make. 2005-10-20 19:46:34 +00:00
Eric Christopher
1b8a72ae7c Add basic support for Mach-O file format. 2005-09-22 21:22:33 +00:00
H. Peter Anvin
5180bc8a59 Update dependencies 2005-01-14 23:05:31 +00:00
Ed Beroset
94d7fb01a6 Added "splint" as a target to simplify running splint on all sources. 2004-12-17 01:06:10 +00:00
H. Peter Anvin
9bab3d57d4 Don't delete config.h.in when doing "make spotless" 2003-09-12 22:30:50 +00:00
H. Peter Anvin
2ef2f06125 Enable the use of a config.h file and autoheader. At this point we don't
actually *use* the resulting configuration file, but it keeps autoconf
from creating an insanely long compiler command line, which can cause
problems all by itself.  Eventually we can do:

#ifdef HAVE_CONFIG_H
#include "config.h"
#endif

... to get the same information.
2003-09-01 04:19:37 +00:00
H. Peter Anvin
2daf5e456a Making the spec file part of dist is something for the Makefile, not
for the release script
2003-08-29 19:56:40 +00:00
H. Peter Anvin
73320328c1 Generate stabs format debugging info for ELF 2003-07-09 19:11:10 +00:00
H. Peter Anvin
d9dbf3e946 Fix ordering rule in "make spotless" 2002-09-13 00:25:44 +00:00
H. Peter Anvin
aa72aa5bfd Clean doc directory when making "make dist" 2002-09-13 00:23:29 +00:00
H. Peter Anvin
24cfef4f8f Clean up unnecessary dependencies. 2002-09-12 16:34:06 +00:00
H. Peter Anvin
232badbbbc This is the "megapatch":
a) Automatically generate dependencies for all Makefiles;
b) Move register definitions to a separate .dat file;
c) Add support for "unimplemented but there in theory" registers.
2002-06-06 02:41:20 +00:00
H. Peter Anvin
e26f002571 Add a way to link with specific system libraries (e.g. efence). 2002-05-26 23:55:34 +00:00
H. Peter Anvin
aa8b6a1ff7 Spec file now depends on version.pl too 2002-05-21 02:47:08 +00:00
H. Peter Anvin
9399421303 Correct the generation of the spec file with a serial number. 2002-05-21 02:46:45 +00:00
H. Peter Anvin
f29b128afd Accept X.YYplZ as a valid version number (equivalent to X.YY.0.Z) and
generate Serial: tags in the RPM spec file to help clue RPM in.
2002-05-21 02:28:51 +00:00
H. Peter Anvin
b9f0510eb5 Remove autom4te.cache when cleaning up config.* 2002-05-19 02:02:20 +00:00
H. Peter Anvin
5b654fa834 Cleaner way to handle the PERLREQ removal 2002-05-19 01:59:37 +00:00
H. Peter Anvin
0fcdadeb55 Fix so that the configure.in works with autoconf 2.5x; make sure
"make cleaner" cleans up all that it needs to clean up
2002-05-19 01:57:54 +00:00
H. Peter Anvin
8e4994d034 Undo a change that wasn't meant for public consumption (yet.) 2002-05-17 16:43:17 +00:00
H. Peter Anvin
fa6362683b Clean up the output/ and (to some degree) test/ directories. 2002-05-17 16:26:33 +00:00
H. Peter Anvin
e388d5be4f Separate out the "tar" operation from the "make dist" operation
This is necessary for the release script (still in progress)
2002-05-05 23:48:07 +00:00
H. Peter Anvin
87242df32d Update nasm.spec; preprocess it to use the version number from the
"version" file.
2002-05-04 05:14:03 +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
4b563afc81 Handle separate source and object directories correctly. 2002-05-04 00:15:02 +00:00
H. Peter Anvin
8ac364139a NASM 0.98.30 2002-04-30 21:09:12 +00:00
H. Peter Anvin
225c5926f0 NASM 0.98.22 2002-04-30 21:06:16 +00:00
H. Peter Anvin
734b188090 NASM 0.98.09 2002-04-30 21:01:08 +00:00
H. Peter Anvin
af535c16cf NASM 0.98.03 2002-04-30 20:59:21 +00:00
H. Peter Anvin
41bf8002b2 NASM 0.98 2002-04-30 20:58:18 +00:00
H. Peter Anvin
ef7468f4ec NASM 0.98p7 2002-04-30 20:57:59 +00:00
H. Peter Anvin
620515ab4e NASM 0.98p6 2002-04-30 20:57:38 +00:00
H. Peter Anvin
cd08b15c28 NASM 0.98p3.7 2002-04-30 20:57:19 +00:00
H. Peter Anvin
b64535fd4e NASM 0.98p3.3 2002-04-30 20:55:37 +00:00
H. Peter Anvin
ce14ce6fc4 NASM 0.98p3.2 2002-04-30 20:54:58 +00:00
H. Peter Anvin
900fa5b26b NASM 0.98p3-hpa 2002-04-30 20:54:13 +00:00
H. Peter Anvin
76690a12ad NASM 0.96 2002-04-30 20:52:49 +00:00