Peter Johnson [Mon, 10 Mar 2003 08:55:41 +0000 (08:55 -0000)]
Unmodularize errwarn, while making key errwarn functions replaceable.
Also removes dependency of libyasm on libintl (gettext), so it can be linked
-no-undefined now!
Peter Johnson [Fri, 15 Nov 2002 08:04:41 +0000 (08:04 -0000)]
Add basic x86-64 support (memory references are not properly handled yet).
It's enabled via the [bits 64] directive.
Add some tests for x86-64 as well as 32/16 bit modes.
Enable some previously committed tests in Makefile.inc.
Peter Johnson [Thu, 7 Nov 2002 19:50:06 +0000 (19:50 -0000)]
Go back to using a more-centralized function for front-end error reporting.
Also fix a crash in one of the error conditions (inappropriate cleanup call).
Peter Johnson [Mon, 4 Nov 2002 08:35:35 +0000 (08:35 -0000)]
Add the "real" NASM preprocessor, and default to it. As NASM is LGPL, no
licensing issues with this. All the compiler warnings have been fixed, and
most namespace issues resolved. However, the integration isn't perfect, and
there are probably memory leaks. Note that right now the real NASM preproc
and "compatible" NASM parser share a module. The parser should probably be
renamed to avoid extra loading and code source confusion.
Peter Johnson [Fri, 1 Nov 2002 10:05:03 +0000 (10:05 -0000)]
Modularize errwarn. gettext()-ize in errwarn, not in every module, eliminating
libintl dependency in modules.
Also standardize initialize() and cleanup() functions.
Move replace_extension() from file.c to main.c.
Clean up some extern variable declarations in various places (particularly
nasm-compatible parser).
Peter Johnson [Sun, 27 Oct 2002 09:21:39 +0000 (09:21 -0000)]
Delete last of global variables by making a line manager and passing around
the line index. Fixes some minor line number/error message nits due to
incorrect usage of line_index in old global variable method.
Peter Johnson [Sat, 26 Oct 2002 08:25:39 +0000 (08:25 -0000)]
Dynamically load all modules (preloading some of the default ones).
Start reducing global variables for cleaner module separation.
Add rudimentary debug format module interface and "null" debug format.
Peter Johnson [Tue, 22 Oct 2002 08:42:16 +0000 (08:42 -0000)]
Get rid of expr_xform_neg_tree(), integrating its functionality into
expr_level_tree(). This fixes negative equ's and probably other issues.
This also makes expr_simplify() a macro pointing to expr_level_tree().
Peter Johnson [Tue, 22 Oct 2002 06:37:24 +0000 (06:37 -0000)]
Fix COFF_SET_VMA output (needed to add section start address to addend).
To ensure all section start addresses are known, added a first pre-pass of
sections to calculate each one's address.
Peter Johnson [Mon, 21 Oct 2002 07:38:15 +0000 (07:38 -0000)]
Run test input files through standard input instead of as input files to avoid
pathname changing issues when builddir != srcdir (previous workaround worked
for text files, but for more complex objfmts such as coff that embed the source
filename in the binary output file, we need to find a different way).
Peter Johnson [Tue, 15 Oct 2002 06:45:45 +0000 (06:45 -0000)]
Add general objfmt-specific data to symrec.
Add delete function for symrec objfmt-specific data to objfmt interface.
Delete declare_data_copy function from objfmt interface (it wasn't being called
from anywhere).
Implement functions missing from dbg objfmt.
Peter Johnson [Sat, 12 Oct 2002 07:41:39 +0000 (07:41 -0000)]
Make bytecode and effaddr "data" extensions more portable by including the
base structure as the first element in each data structure. Concept taken from
the JPEG library.
Peter Johnson [Mon, 7 Oct 2002 19:06:09 +0000 (19:06 -0000)]
Add the ability to add an additional transformation function into the execution
flow of expr_level_tree(). Feature needed for objfmts/bin upcoming fixes.
Peter Johnson [Sun, 6 Oct 2002 19:43:51 +0000 (19:43 -0000)]
Make output endian-tolerant by making intnum and floatnum output functions for
arch. This will also simplify other objfmt expr output functions. Change
file functions to use bits instead of byte/short/long, and create both little
and big endian versions. This name change caused changes in several other
files.
Peter Johnson [Sat, 5 Oct 2002 06:00:37 +0000 (06:00 -0000)]
Undo part of the tools/re2c flattening. Specifying a re2c_CFLAGS causes
automake to automatically prepend re2c- to all generated object files,
eliminating the main.o conflict. Also, it prevents extended compilation flags
from applying to the re2c build.
In Makefile.am, also allow automake to automatically include the autoconf
conditionally-included files strsep and mergesort.
Peter Johnson [Fri, 4 Oct 2002 07:23:11 +0000 (07:23 -0000)]
Make test scripts more portable by detecting echo line-ending features, using
fewer options for sed, and using a perl script for hexdump. As a side effect,
hexdumps are more accurate (the hexdump util put * for as many multiples as
were output, whereas the perl script outputs a line for every byte, no matter
what).
Peter Johnson [Thu, 3 Oct 2002 19:08:13 +0000 (19:08 -0000)]
Create a common out_test.sh test script to be used by a variety of tests.
Rename objfmts/bin/tests/*.bin.hx to *.hex to fit better in the common usage.
Peter Johnson [Thu, 3 Oct 2002 19:02:53 +0000 (19:02 -0000)]
x86_bc_resolve_insn(): If x86_expr_checkea fails, return not only
BC_RESOLVE_UNKNOWN_LEN but also BC_RESOLVE_ERROR so that a spurious circular
reference detected is not output from the basic optimizer.