| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
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>
|
|
|
|
| |
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
|
|
|
| |
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
|
|
|
|
| |
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
We can use a perfect hash to decode directives as well.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
| |
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
Run "make alldeps"
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
| |
Be consistent about the naming of the version Makefile fragment. We
use .mak elsewhere for Makefiles, so use that.
|
| |
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
mkdep.pl already used #-- ... --# (two dashes) whereas syncfiles.pl
was using #--- ... ---# (three dashes). Change syncfiles.pl to match
mkdep.pl.
|
|
|
|
|
| |
Correctly handle the null path separator (meaning remove the directory
portion entirely.)
|
|
|
|
|
| |
Add a script to automagically synchronize the list of object files
between the various Makefiles.
|
|
|
|
| |
Sync the file list in Mkfiles/*.mak
|
|
|
|
|
| |
Implement __utf16__() and __utf32__() for the DB family of
pseudo-instructions. Not yet implemented for evaluation context.
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Change the WSAA macros into functions; reducing the icache footprint.
|
| |
|
|
|
|
| |
Add quote.c to all the auxiliary Makefiles, and run "make alldeps".
|
| |
|
|
|
|
|
| |
wmake uses & for continuation, since \ is used for pathname
separators.
|
|
|
|
|
| |
The Makefile uses VPATH and stripped directory names for files, so
generate the dependencies accordingly.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
"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.
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
Apparently -6 compiles are defined to run on anything 386 or newer,
and just use different instruction timings.
|
| |
|
|
|
|
| |
Add Makefile for Netware, using the GNU toolchain.
|
|
|
|
|
| |
Add a Makefile variable, DEBUG, which can be used to set debug options
(-d2, -DLOGALLOC, etc.)
|
|
|
|
|
|
|
|
| |
OpenWatcom needs different strings for compile and link target, so
using -bcl which uses the same string for both is just plain wrong.
This fixes that bit, but running nasm on test/floatx.asm (at least as
a DOS or a Win32 binary) crashes with a NULL pointer reference inside
the C library free() function.
|
| |
|
|
|
|
|
| |
There won't be a Makefile in rdoff in particular, so trying to run
"make clean" there is pointless.
|
| |
|
|
|
|
| |
Run "make alldeps". This stuff probably shouldn't be checked in...
|
|
|
|
|
|
| |
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.
|