Peter Johnson [Wed, 26 Sep 2001 00:57:55 +0000 (00:57 -0000)]
Fix large parts of expression and symbol handling. Actually link in labels
properly (bug #8). Framework added for portable floating point support (bug
#7). Lots of functions still not finished in this commit.
Peter Johnson [Mon, 24 Sep 2001 21:39:45 +0000 (21:39 -0000)]
Change error/warning framework to store a list of errors and warnings instead
of just one at a time. This is the groundwork for printing undefined symbol
messages, which can't be determined until after parsing has been completed
(and should be in the same line order with the other errors).
Peter Johnson [Mon, 24 Sep 2001 06:40:27 +0000 (06:40 -0000)]
Used ternary search tree instead of linked list to store symbol table.
Cleaned up function naming too.
Removed locallabel_base from global.h, moving it into the parser-specific code.
Made sym_table private to symrec.c.
Peter Johnson [Sun, 23 Sep 2001 19:22:04 +0000 (19:22 -0000)]
Get initial bits setting from object format. Change the initial section name
from a function to a constant string. Make mode_bits uniformily an unsigned
char instead of an int.
Peter Johnson [Thu, 20 Sep 2001 06:25:05 +0000 (06:25 -0000)]
Try to fix configure and automake files so everything builds a bit cleaner.
Also try to fix the warnings on the GNU C Library.
Still a lot of work and testing to be done here, but making progress.
Peter Johnson [Thu, 20 Sep 2001 03:21:26 +0000 (03:21 -0000)]
Cleaned up bytecode data structure, some effaddr functions. Made ea an
effaddr * instead of an effaddr to decrease size of bytecode. Changed parser
to use effaddr * as well. Finally fixed issue with ONE by adding flag to
bytecode.data.insn and utilizing spare bytes of the opcode. Hackish, but
works.
Peter Johnson [Wed, 19 Sep 2001 07:20:02 +0000 (07:20 -0000)]
Build section linked list, and support the section directive, including
asking the objfmt module. Add some utility functions for both bytecode
and section to better modularize their data structure usage and common
code. Rename doparse to do_parse to be consistent in naming.
Peter Johnson [Tue, 18 Sep 2001 22:06:09 +0000 (22:06 -0000)]
Print the test function name along with the test case name. Many of our
functions are so small that it doesn't make sense to have a test case for
every function (rather just a test function for every function).
Peter Johnson [Tue, 18 Sep 2001 17:38:45 +0000 (17:38 -0000)]
Add unit test framework using Check (http://check.sourceforge.net/).
Only test included right now is a tiny one for one bytecode function, but
will grow as time goes on.
TODO: check for non ANSI C things required by Check.
Peter Johnson [Sun, 16 Sep 2001 09:13:00 +0000 (09:13 -0000)]
Check for case-insensitive string comparisons. Use strcasecmp and strncasecmp
in the source: if stricmp or strcmpi is available, they're mapped to
strcasecmp.
Peter Johnson [Sun, 16 Sep 2001 04:49:46 +0000 (04:49 -0000)]
Use queue.h macros in section.h, and reference bytecode using bytecodehead.
Remove old "append" function from bytecode.h
Add generic parser functions, clean up parser struct.
Peter Johnson [Sat, 15 Sep 2001 07:16:59 +0000 (07:16 -0000)]
Rename outfmt to objfmt and related files and directories. "objfmt" is more
descriptive of what the module is actually used for ("output" is rather
generic).
Peter Johnson [Sun, 19 Aug 2001 03:52:58 +0000 (03:52 -0000)]
Run through GNU indent using indent profile. Manually fix some changes
(particularly functions such as BuildBC_Insn() which have large numbers
of arguments).
Peter Johnson [Sun, 19 Aug 2001 02:15:18 +0000 (02:15 -0000)]
New modular directory structure: parsers, preprocs, and outfmts.
Moved token.l.in, bison.y.in, and gen_instr.pl to parsers/nasm/.
New parser, preproc, and outfmt structures. None are complete; outfmt
needs the most work.
The raw preprocessor added (for no preprocessing).
Currently the default for the nasm parser is to use the raw preproc; this
should be changed to nasm_preproc once the nasm preprocessor is finished.
A dbg output format is also new; because outfmt isn't done yet, there's not
much implementation.
What structures still need creating: listfmt, debugfmt.
Peter Johnson [Wed, 25 Jul 2001 00:33:10 +0000 (00:33 -0000)]
Add lexing, parsing, and internal format for strings and character constants.
Completely handle data declarations (db/dw/etc) and reserve space declarations
(resb/resw/etc).
Peter Johnson [Wed, 11 Jul 2001 21:16:22 +0000 (21:16 -0000)]
At least in NASM syntax, there is no differentation between labels and data
declarations, so delete SYM_DATA. We may add it back in someday if we add
another syntax.
Peter Johnson [Wed, 11 Jul 2001 16:57:25 +0000 (16:57 -0000)]
Repo-copied include files to src to make automake/autoconf build structure
work properly. Changed Makefile.am, src/Makefile.am, and configure.in to
match directory changes.