Commit graph

134 commits

Author SHA1 Message Date
Cyrill Gorcunov
0835915c1d iflag: Start using new instruction flags engine
Here we start using instruction flags generator.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2013-11-24 13:20:59 +04:00
Cyrill Gorcunov
acfb97d3db make: Add 'golden' target
We've 'test' target in toplevel Makefile, lets be
complete and allow to generate "golden" tests from
toplevel as well.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2013-11-24 12:26:35 +04:00
Jin Kyu Song
5f3bfee708 disp8: Consolidate a logic to get compressed displacement
Consolidated two separate but similar functions in nasm and ndisasm
into a commonly linked source code.
To encode and decode the compressed displacement (disp8*N) for EVEX,
N value should be derived using various conditions.

Signed-off-by: Jin Kyu Song <jin.kyu.song@intel.com>
2013-11-20 15:40:55 -08:00
Cyrill Gorcunov
32019da3a4 Revert "make: Remove generated files on clean target"
This reverts commit b6c7291b3d.

We already have this cleanup stage in "cleaner" target, I managed
to miss it.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2013-10-28 11:35:55 +04:00
Cyrill Gorcunov
b6c7291b3d make: Remove generated files on clean target
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2013-10-27 21:15:47 +04:00
H. Peter Anvin
8bbf299307 Merge remote-tracking branch 'origin/master' 2013-10-24 14:17:23 +01:00
H. Peter Anvin
33eecb68c2 Makefile.in: always run "make alldeps" when "make dist"
"make dist" (tarball generation) really should include "make alldeps"
so the Makefile dependencies are correct.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2013-10-24 13:57:57 +01:00
H. Peter Anvin
faf04eec3c Run "make alldeps" to update dependencies 2013-10-24 13:45:06 +01:00
H. Peter Anvin
165eead3b8 Makefile.in: generate manpages for "make dist"
Make sure the "dist" target generates the man pages.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2013-10-24 13:25:51 +01:00
H. Peter Anvin
d089c2251b Revert "build: Include pregenerated nasm manpages"
This reverts commit 99427bdb6c.

We don't include generated files in the repository, instead we should
pregenerate them for the tarball generation, just as we do for the
Perl-generated files.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2013-10-24 13:22:19 +01:00
Cyrill Gorcunov
99427bdb6c build: Include pregenerated nasm manpages
It's been reported that force people to install
asciidoc for man pages generation is not acceptible.
Just ship them pregenerated.

http://bugzilla.nasm.us/show_bug.cgi?id=3392262

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2013-07-22 10:09:35 +04:00
H. Peter Anvin
a9397830f7 Make the errors for missing man page tools comprehensible
A lot of confusion was had due to missing asciidoc...

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2013-05-17 12:03:24 -07:00
Cyrill Gorcunov
1930007f3f make: Don't forget to generate manpage for all target
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2013-02-18 01:31:59 +04:00
Cyrill Gorcunov
1a63699ce5 man: Generate manpages from asciidoc format
The asciidoc format is a way more easier to read
by a human.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2013-02-17 22:50:19 +04:00
Cyrill Gorcunov
b5e8fec848 preproc: Move NOP preprocessor into separate file
No need to carry it in nasm.c, let it be more modular.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2012-05-07 11:34:27 +04:00
H.J. Lu
04633d07b6 backend: add support for x32 ELF
Add an x32 ELF (32-bit code with the CPU in 64-bit mode) backend.
2012-02-03 12:08:59 -08:00
Cyrill Gorcunov
fc0c1281db preproc: Add tokenization tracing
It's a bit more than that, also TRACE=1 make
flag added to run this facility on and off
at compiling time.

Debug feature only, doesn't affect regular users.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-06-25 19:51:44 +04:00
H. Peter Anvin
1f0e0bcf1f Merge branch 'nasm-2.09.xx' 2011-06-23 13:27:43 -07:00
H. Peter Anvin
c050362865 Makefile: hopefully fix rdoff parallel build problems
The strange dependency on nasmlib.o causes serious issues in parallel
build; hopefully fix it.

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2011-06-23 13:26:59 -07:00
Cyrill Gorcunov
4297aaf117 make: Add cscope targed
For easier use of cscope

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-02-14 21:53:15 +03:00
Cyrill Gorcunov
0d485cbdd6 make: Add tags and TAGS targets
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2010-11-05 14:18:51 +03:00
Cyrill Gorcunov
81d53791b0 make: Add "test" target into .PHONY
Michael proposed to run

 | sed -i -e '/^.PHONY: all/s/$/ test/' Makefile.in

since we have test/ directory. Good idea.

Reported-by: Michael Sterrett
Patch-by: Michael Sterrett
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2010-10-29 00:40:16 +04:00
H. Peter Anvin
5e2e8b9105 Rename filenames to 8.3 format
Apparently some people still care about compiling native on MS-DOS,
and we don't have a significant number of files which need adjustment.

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2010-06-15 10:47:16 -07:00
H. Peter Anvin
084b13227e Add generic ilog2 functions
Add ilog2_{32,64}() and alignlog2_{32,64}() ... the latter is intended
for alignment statements and return -1 for non-power-of-2 other than 0
(which returns 0).

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2010-04-21 16:43:20 -07:00
H. Peter Anvin
34543131ca Makefile: clean up the lib directory on make clean
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2010-04-21 16:41:37 -07:00
Cyrill Gorcunov
4c8e74e176 make: Update pecoff.h related deps
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2010-04-21 18:51:14 +04:00
Cyrill Gorcunov
126faf2e3b output/outelfX.c: Use definitions from stabs.h
Also made Makefile.in to handle dependency.
There are some makefiles in Mkfiles\ should
be fixed as well.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2010-01-03 15:04:36 +03:00
H. Peter Anvin
6650557a35 Run "make alldeps" 2009-11-30 13:28:31 -08:00
Cyrill Gorcunov
a50f829435 Merge elf header files
Merge elfcommon.h, elf32.h, elf64.h into
single elf.h -- we do support both elf32
and elf64 anyway. Let put them into common
place.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2009-11-06 22:00:41 +03:00
H. Peter Anvin
eaa68f1c85 Add strlcpy() function
Add strlcpy() function and implementation, and use configure to detect
if strlcpy() is natively available on the system.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2009-08-10 15:59:34 -07:00
H. Peter Anvin
ab6443969a Run make alldeps 2009-07-18 18:43:28 -07:00
H. Peter Anvin
afa06137fa Hash even backend-specific directives, unify null functions
Hash all directives, even the ones that are backend-specific,
and instead pass the backend an already-parsed directive number.

Furthermore, unify null functions across various backends.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2009-07-12 12:55:24 -07:00
H. Peter Anvin
323fcff32b Use a phash to decode directives
We can use a perfect hash to decode directives as well.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2009-07-12 12:04:56 -07:00
Keith Kanios
6d0d0d2736 macho64: Manually merge macho64 branch with master branch. 2009-07-08 23:04:52 -05:00
H. Peter Anvin
dcd6c5d877 Run make alldeps 2009-06-27 22:16:33 -07:00
H. Peter Anvin
31b707bef0 Move backend-specific code to output/; break out null debug stuff
Move backend-specific code into the output/ directory, and make the
null debugging backend a separate file (it certainly isn't needed for
ndisasm...)

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2009-06-27 22:07:33 -07:00
H. Peter Anvin
1acf6ba822 Handle the new ELF headers in the dependency generation
The dependency machinery relies on properly rooted includes, so give
it to them... the path syntax munging machinery in the dependency
script handles it from a Makefile syntax perspective, and then we can
hope that C compilers are smart enough to deal with forward-slash
paths even when that is not the native syntax.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2009-06-25 13:06:49 -07:00
H. Peter Anvin
d219a3e46f ELF: add header files, begin merging common code, drop .comment
Add something approaching real ELF header files.

Begin merging the common ELF code, beginning with the section name
detection.

Drop automatic generation of .comment section, and in particular the
treatment of .common as a special section (if we decide generating
.comment is still a good idea, we should just do it as a macro.)

Augment the list of known sections, and make it table-driven.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2009-06-25 12:30:50 -07:00
H. Peter Anvin
d8979222e9 nasm.nsi: add NASM Manual; automate version generation
Add the NASM Manual (as a PDF) to the Windows installer, and abstract
out the version number.
2009-04-06 19:12:34 -07:00
H. Peter Anvin
1fee7d2d23 ELF: use rbtree for symbol searches
Linear searches are evil, so use an llrbtree to search for symbols by
offset.  This doesn't change the preexisting behaviour that we only
look for global symbols.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2008-11-06 19:55:05 -08:00
H. Peter Anvin
4b9358928b Move all version strings to a single compilation unit (ver.c)
Move all the version strings to a single compilation unit, ver.c; this
does not include the version macros, which are fed into macros.c.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2008-10-31 16:53:49 -07:00
H. Peter Anvin
e8873121aa rbtree: drop the data pointer; instead rely on being embedded
Drop the data pointer, and instead assume the struct rbtree will be
embedded in a bigger data structure (to be extracted via
container_of()).

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2008-10-30 10:58:28 -07:00
H. Peter Anvin
3e364fe274 Left-leaning red-black tree data structure
Implement library functions for "left-leaning red-black trees" with
uint64_t keys.  This is meant for looking up symbols by address in the
backends that need to do so, e.g. ELF.

A good question is if there is a better way to do this, that recovers
the original symbol, but that's a future issue.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2008-10-29 23:31:56 -07:00
H. Peter Anvin
5da04b035c make alldeps
Run "make alldeps"

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2008-10-29 21:03:17 -07:00
H. Peter Anvin
03c4f90afa output: add common file outlib.c for common functions; realsize()
Add a common file, outlib.c, for output formats.  Add the function
realsize() instead of open-coded variants in almost every backend.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2008-10-27 22:19:59 -07:00
H. Peter Anvin
325a4bff50 Run "make alldeps" 2008-09-09 09:54:47 -07:00
Victor van den Elzen
1b1522fadf Add a 'make test' target. 2008-07-16 12:20:22 +02:00
H. Peter Anvin
cdc69da37c version.mak for the version Makefile fragment
Be consistent about the naming of the version Makefile fragment.  We
use .mak elsewhere for Makefiles, so use that.
2008-07-13 13:54:47 -07:00
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