Peter Johnson [Sun, 10 Mar 2002 23:15:14 +0000 (23:15 -0000)]
Add bin object format.
Changes to:
objfmt interface: added parameter to directive() for sections access.
section interface: moved start to be present for all section types.
basic optimizer: add section start to offset determination.
(much of the section start changes are due to the need to make sure offsets
don't end up being optimized into byte-sized offsets that can't be relocated).
Michael Urman [Thu, 7 Mar 2002 08:50:39 +0000 (08:50 -0000)]
Add const char *in_filename arguments to
- preproc initialize function
- parser parse function (to pass to preproc initialize)
so that the preprocessor has a clue what file it's in.
Michael Urman [Thu, 7 Mar 2002 08:32:22 +0000 (08:32 -0000)]
YAPP has arrived.
Or at least it has begun. At this point it can only handle:
%define
%if*def
%el*def
%else
%endif
%include (to some degree; needs a lot of thought, but recurses fine)
and replacing simple %defines (like %define foo bar)
And like all code, it's probably horribly inconsistent about variable
names, etc. We'll wash it later.
Peter Johnson [Thu, 7 Mar 2002 07:40:40 +0000 (07:40 -0000)]
Enhance bc_resolve() implementation a bit, but comment out, as this function
will probably disappear in the near future (its functionality will be handled
directly by the object format module without the need for another pass).
Peter Johnson [Wed, 27 Feb 2002 05:43:16 +0000 (05:43 -0000)]
Revamp object format functional interface a bit. Now, only the output()
function gets a FILE *, and it's the only function that can write to a file.
The object file is thus not opened until AFTER parsing and most error checking
is complete. Necessitated adding a special case for the dbg object format
because it needs to output to the "object" (debug) file from essentially every
function. Added a global (debug_file) to support this.
Peter Johnson [Wed, 20 Feb 2002 08:16:13 +0000 (08:16 -0000)]
Test circular reference detection. Very basic examples from NASM's docs on
critical expressions.
NASM behavior: 1-3 fail, 4 generates a 4-byte offset in the memory expression.
YASM behavior: 1&2 fail (and rightfully so :), 3 works as expected, and 4
generates a 1-byte offset.
Peter Johnson [Wed, 20 Feb 2002 07:38:41 +0000 (07:38 -0000)]
Reverse how traverse functions do early termination (now, they terminate on
a non-zero func return and return the value func returned). Document the
changes in the header files.
Peter Johnson [Wed, 20 Feb 2002 07:35:43 +0000 (07:35 -0000)]
Fix issue with how symrec's are handled when an expression is copied: old code
just assigned the pointer: but the symrec is deleted (if it's not in the symbol
table) when the expr is deleted. Thus, we need to create a copy of the symrec
instead of just reusing the same value if it's going to be deleted later. This
trickles down to objfmt to copy the objfmt-local data.
Peter Johnson [Sun, 13 Jan 2002 08:53:24 +0000 (08:53 -0000)]
Enhance error/warning framework by allowing specific warnings to be disabled,
all warnings to be disabled, and warnings to be treated as errors, much in the
style of GNU tools such as gcc.
Peter Johnson [Fri, 11 Jan 2002 04:36:23 +0000 (04:36 -0000)]
In optimize_bytecode(), calculate bc->offset *before* calling bc_calc_len().
This is because calc_len may want to know the current bytecode's offset (eg for
determining relative displacement length).
Peter Johnson [Thu, 10 Jan 2002 05:01:36 +0000 (05:01 -0000)]
Add new bc_resolve() family, and rewrite calc_len to /just/ calculate the
length, not modify anything else (particularly expressions w/temp. resolved
labels).
Peter Johnson [Wed, 9 Jan 2002 07:23:00 +0000 (07:23 -0000)]
Make resolve_label() take a symrec * instead of a section * and bytecode *.
Extend expr_expand_equ() into expr_expand_labelequ() and call resolve_label()
here.
Peter Johnson [Mon, 7 Jan 2002 07:42:27 +0000 (07:42 -0000)]
Change from current file/line dual storage to a monotonically-increasing line
"index". This fixes some problems with assumptions made by various parts of
the code that are invalidated when the line number doesn't always increase (eg.
when the NASM %line directive is used).
Speed fixes are needed to the implementation of the line_* functions in
globals.c before this is finished.
Peter Johnson [Fri, 28 Dec 2001 06:16:56 +0000 (06:16 -0000)]
Remove programmer documentation out of source tree and into the yasm-doc CVS
module. Since user documentation is going to be the only doc/ stuff, get rid
of user subdirectory. Eliminate top-level doc/Makefile.am as user doc
generation will be integrated into top-level Makefile.am (or maybe
doc/Makefile.inc).
Peter Johnson [Fri, 28 Dec 2001 06:16:54 +0000 (06:16 -0000)]
Remove programmer documentation out of source tree and into the yasm-doc CVS
module. Since user documentation is going to be the only doc/ stuff, get rid
of user subdirectory. Eliminate top-level doc/Makefile.am as user doc
generation will be integrated into top-level Makefile.am (or maybe
doc/Makefile.inc).
Peter Johnson [Wed, 26 Dec 2001 20:52:44 +0000 (20:52 -0000)]
Remove config/* files, and automatically create the config directory in
autogen.sh if it's not present. This will have the needed config/ files
generated by automake -a when they're needed.
Peter Johnson [Wed, 26 Dec 2001 07:52:47 +0000 (07:52 -0000)]
Don't include config/* files explicitly (they're included implicitly if
needed). Remove config.guess and config.sub, as automake -a doesn't seem to
update them.
Peter Johnson [Wed, 26 Dec 2001 07:14:06 +0000 (07:14 -0000)]
Massive build system change: single Makefile instead of recursive.
Note: still is automake-generated, but uses .inc files in the various
subdirectories instead of .am files.
TODO: Move arch-specific components of bytecode_test and memexpr_test to
arch/x86.
Peter Johnson [Wed, 26 Dec 2001 07:14:05 +0000 (07:14 -0000)]
Massive build system change: single Makefile instead of recursive.
Note: still is automake-generated, but uses .inc files in the various
subdirectories instead of .am files.
TODO: Move arch-specific components of bytecode_test and memexpr_test to
arch/x86.
Peter Johnson [Mon, 24 Dec 2001 17:51:43 +0000 (17:51 -0000)]
Add autoconf 2.50-based configure.ac. Keep configure.in around for 2.13
compatibility, but bring up to date with new organization of configure.ac.
Remove CHECK_FLAGS. Someday, remove autoconf 2.13-based files.
Peter Johnson [Mon, 24 Dec 2001 17:51:43 +0000 (17:51 -0000)]
Add autoconf 2.50-based configure.ac. Keep configure.in around for 2.13
compatibility, but bring up to date with new organization of configure.ac.
Remove CHECK_FLAGS. Someday, remove autoconf 2.13-based files.
Peter Johnson [Fri, 7 Dec 2001 03:32:05 +0000 (03:32 -0000)]
Start work on optimizer module. Moved all "post-parser-finalization" code
into the optimizer stage, where it belongs. Naming has changed, but most
implementations have not been brought up to date to do what they say they
do.