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.
Peter Johnson [Wed, 11 Jul 2001 04:07:11 +0000 (04:07 -0000)]
First attempt at supporting relative jump instructions. A few hacks, but
seems to work well.
A few other minor fixes/changes as well (noticed when coding).
Michael Urman [Thu, 5 Jul 2001 08:37:59 +0000 (08:37 -0000)]
Long hairy integration of expression handling into the grammar.
Added printing, getvalue functionality to expr.[ch]
Changed immval to house an expr* instead of an unsigned long.
gen_instr.pl needs to be updated for ONE cases to fix pointer compares.
bison s/r conflicts still need to be handled.
Peter Johnson [Thu, 5 Jul 2001 07:21:35 +0000 (07:21 -0000)]
Change groupdate into an array, and make everything 0-based in the output
code. Bit of a kludge required in gen_instr.pl to slide the $0.\d down by
one (is there a better way to do it?).
Michael Urman [Thu, 5 Jul 2001 04:53:13 +0000 (04:53 -0000)]
Added support for spitting out multiple warnings and errors.
And consequently decided that i'm probably not validating half the
fields correctly. Maybe peter will fix that. Hint hint.
Peter Johnson [Thu, 5 Jul 2001 02:53:35 +0000 (02:53 -0000)]
Completely reorder instructions to match that in GNU binutils
/include/opcode/i386.h, used for the GAS assembler.
This also helped find some missing instructions and CPU field errors, not
all of which have been added/corrected yet.
Peter Johnson [Wed, 4 Jul 2001 20:57:53 +0000 (20:57 -0000)]
Use %1 and %2 instead of %s and %d for "duplicate definition" error message
(allows message to be arbitarily changed, including reversing order of %1 and
%2 without having to change every location it's called from).
Peter Johnson [Wed, 4 Jul 2001 04:24:52 +0000 (04:24 -0000)]
Add instruction grouping to decrease size of generated yacc code.
gen_instr.pl still needs to actually implement this, so this currently breaks
the build.
Peter Johnson [Thu, 28 Jun 2001 08:50:09 +0000 (08:50 -0000)]
Use autoconf to determine when to include our implementation of strdup, so
remove util.c and create strdup.c. Make util.h, strdup.c, and several source
files use config.h defines.
Peter Johnson [Thu, 28 Jun 2001 08:48:32 +0000 (08:48 -0000)]
Use autoconf to determine when to include our implementation of strdup, so
remove util.c and create strdup.c. Make util.h, strdup.c, and several source
files use config.h defines.
Michael Urman [Wed, 13 Jun 2001 05:43:59 +0000 (05:43 -0000)]
Added handling of labels including:
better symbol table functions
calling them from yacc rather than lex
a new warning for .label before normal_label
locallabel_base now a symrec* instead of a strdup'd string.
Still needs some more error checking (to not allow multiple copies of
the same label, etc.)
Also includes move to y_strdup for bison.y.in (ANSI compatibility)
Peter Johnson [Wed, 30 May 2001 07:41:03 +0000 (07:41 -0000)]
Reorganize (yet again) effective address, immediate value, and instruction
structures.
Add more interface functions to isolate structure internals and make it
easier to add warnings (such as for multiple overrides/prefixes).
Michael Urman [Wed, 30 May 2001 06:43:02 +0000 (06:43 -0000)]
Horrible hack to fold ONE, and REG_A* into more general versions of the
grammar, but only if they actually exist in the set; generate normally
if the more general version doesn't exist.
Peter Johnson [Tue, 22 May 2001 20:48:21 +0000 (20:48 -0000)]
Call new error output functions after every line.
Moved line_number increment into single location.
Use SetEASegment() to set the segment override in memory addresses.
Peter Johnson [Tue, 22 May 2001 20:44:32 +0000 (20:44 -0000)]
Split error and warning handlers into notify and output functions.
Paired with changes in bison.y.in, this will make sure only one error
and/or warning is output for each line.
Peter Johnson [Tue, 22 May 2001 07:17:04 +0000 (07:17 -0000)]
Fix all shift/reduce and reduce/reduce conflicts except for those that
involve REG_AL, REG_AX, and REG_EAX with immediates. Also eliminated
various unused rules.
Still need to figure out the proper thing to do with XCHG and AX/EAX as
one of the parameters.
Build still breaks because ONE is not a real token (it needs to be handled
along with the AL, AX, and EAX conflicts in gen_instr.pl).
Michael Urman [Mon, 21 May 2001 22:33:23 +0000 (22:33 -0000)]
Changed structure to one hash - now order is not preserved.
On the bright side, rules use the | where appropriate.
Arguments after TO rules are shifted right by 1.
Aliased arguments are handled in the lexer.
Michael Urman [Mon, 21 May 2001 21:46:33 +0000 (21:46 -0000)]
First commit. Generates all needed sections of token.l, bison.y from
instrs.dat, token.l.in, bison.y.in. Optionally can use other files, or
just verify input is valid.