instruction handling.
Use the GNU gperf file format, but continue to use our custom minimal
perfect hash generator.
svn path=/trunk/yasm/; revision=1929
enabled with --enable-python (defaults to auto-detect).
Thanks to some magic in python-yasm/Makefile.inc and setup.py, this actually
plays nicely with automake distcheck.
* m4/pythonhead.m4: Script to find Python.h.
* m4/Makefile.inc: Include it in distfiles.
* configure.ac: Add --enable-python option and Python and Pyrex detection.
* tools/Makefile.inc: Pull tools/python-yasm/Makefile.inc into build.
* python-yasm/Makefile.inc: Add automake build magic for extension.
* setup.py: Likewise.
svn path=/trunk/yasm/; revision=1456
instead of re2c-generated code. This gives identifier recognition a
significant speedup and also drastically shortens compilation time of yasm
itself. This rewrite encouraged combining instruction and prefix
recognition into one function and register and target modifier
recognition into a second function (rather than having 5 or so separate
functions).
Also created a state in the NASM parser (as was done in the GAS parser),
so instructions/prefixes are only looked for until an instruction is
recognized. This avoids search time in the instructions hash for operands.
The tool used to generate the new identifier recognition is called GAP.
Someday we might extend this to generate more code than just the perfect
hash lookup.
* tools/gap: New tool to Generate Architecture Parser (aka perfect hashes).
* phash.c, phash.h: Helper functions used by GAP-generated code.
* x86id.re: Delete. Split into..
* x86parse.gap: Contains all identifier recognition portions.
* x86id.c: Contains instruction operand tables and code and higher-level
entry points into x86parse.gap perfect hash recognizers. Chose to flow
history of x86id.re into this file.
* arch.h: Combine instruction/prefix entry points and register/target
modifier entry points.
* lc3barch.c, lc3bid.re, lc3barch.h: Update to match.
* x86arch.c, x86arch.h: Update to match.
* Makefile.am, various Makefile.inc: Update.
* POTFILES.in: Update due to numerous file changes (not just this commit).
* Mkfiles: Update. VC build files untested at the moment.
svn path=/trunk/yasm/; revision=1395
- Moved (by repocopy) main.c to re2c.c
- Moved (by repocopy) parser.y to re2c-parser.y
- Changed to Makefile.inc's rather than Makefile.am's
- Modified all the source file local includes to point to tools/re2c/*.h
svn path=/trunk/yasm/; revision=668