Peter Johnson
a46ed054f7
Check for NULL datavals to avoid crashes.
...
svn path=/trunk/yasm/; revision=250
24 years ago
Peter Johnson
1abd74ba04
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.
svn path=/trunk/yasm/; revision=229
24 years ago
Peter Johnson
197f8857e4
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).
svn path=/trunk/yasm/; revision=223
24 years ago
Peter Johnson
5d71f1f737
Fixed nasty bug in error handling. It should have been setting the return
...
bytecode value to NULL on error, but wasn't (random return value is bad!).
svn path=/trunk/yasm/; revision=221
24 years ago
Peter Johnson
f9209d5200
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.
svn path=/trunk/yasm/; revision=220
24 years ago
Peter Johnson
ac22f77d42
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.
svn path=/trunk/yasm/; revision=210
24 years ago
Peter Johnson
63d8a451b7
Define YY_NEVER_INTERACTIVE, because we never are :).
...
svn path=/trunk/yasm/; revision=209
24 years ago
Peter Johnson
91f41e241b
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.
svn path=/trunk/yasm/; revision=204
24 years ago
Peter Johnson
60fd596a66
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.
svn path=/trunk/yasm/; revision=203
24 years ago
Peter Johnson
d0c4ae1572
Make sure bison.y and token.l get included in the distribution.
...
svn path=/trunk/yasm/; revision=199
24 years ago
Peter Johnson
1fd753346c
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.
svn path=/trunk/yasm/; revision=196
24 years ago
Peter Johnson
0b24caa55c
Cleanup of local .cvsignore files after addition of global CVSROOT/cvsignore.
...
svn path=/trunk/yasm/; revision=193
24 years ago
Peter Johnson
e649bada33
Change ../ to $(top_builddir). It's clearer and safer.
...
svn path=/trunk/yasm/; revision=185
24 years ago
Peter Johnson
ef19b09dc2
Limit some tools to --enable-dev only. Only check for and use them if
...
--enable-dev is passed to configure.
svn path=/trunk/yasm/; revision=184
24 years ago
Peter Johnson
79295b7e9d
Add rcs id.
...
svn path=/trunk/yasm/; revision=181
24 years ago
Peter Johnson
52847afaff
Use absolute paths instead of srcdir because libintl.h is built in the
...
build directory. To pass distcheck we need to do it this way.
svn path=/trunk/yasm/; revision=179
24 years ago
Peter Johnson
b2890b8f9d
$Id$ -> $IdPath$.
...
svn path=/trunk/yasm/; revision=174
24 years ago
Peter Johnson
d758a063b2
Add barebones optimizer module framework.
...
svn path=/trunk/yasm/; revision=169
24 years ago
Peter Johnson
305d332441
Add prefix on local functions so they're easy to find in the debugger.
...
svn path=/trunk/yasm/; revision=168
24 years ago
Peter Johnson
20daa47e62
Reindent to match other code for the most part.
...
svn path=/trunk/yasm/; revision=167
24 years ago
Peter Johnson
f8b36698fa
Update file descriptions to indicate that these files are just for the
...
NASM-compatible parser.
svn path=/trunk/yasm/; revision=165
24 years ago
Peter Johnson
3c2a67ca1c
Use bytecode * instead of bytecode in parser.
...
Rename and restructure bytecode functions to make this use clearer.
svn path=/trunk/yasm/; revision=164
24 years ago
Peter Johnson
013530034e
Start building of sections and bytecodes in parser.
...
Still need to add section switching (currently never switches away from
default section).
svn path=/trunk/yasm/; revision=163
24 years ago
Peter Johnson
ca16006ce9
Allow whitespace before a directive.
...
svn path=/trunk/yasm/; revision=162
24 years ago
Peter Johnson
84e0411c49
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.
svn path=/trunk/yasm/; revision=157
24 years ago
Peter Johnson
074b748ece
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).
svn path=/trunk/yasm/; revision=155
24 years ago
Peter Johnson
45df22d110
Convert to using gettext instead of the ugly errwarn constant strings.
...
NOTE: gettextize now needs to be run before building.
svn path=/trunk/yasm/; revision=153
24 years ago
Peter Johnson
86f7268ea8
Add RCSID().
...
svn path=/trunk/yasm/; revision=151
24 years ago
Peter Johnson
77fc6dd491
Standardize order of include statements as well as autoconf'ing those source
...
files that weren't yet.
svn path=/trunk/yasm/; revision=150
24 years ago
Peter Johnson
a34646760c
Allow multiple labels on one line (it's still on the TODO list for NASM :).
...
svn path=/trunk/yasm/; revision=147
24 years ago
Peter Johnson
ae600ce442
Use STAILQ's for datavals and bytecodes.
...
svn path=/trunk/yasm/; revision=146
24 years ago
Peter Johnson
edf74fe9ea
Run through GNU indent using indent profile. Manually fix some changes
...
(particularly functions such as BuildBC_Insn() which have large numbers
of arguments).
svn path=/trunk/yasm/; revision=141
24 years ago
Peter Johnson
382f245f47
Give prototype for nasm_parser_parse().
...
svn path=/trunk/yasm/; revision=137
24 years ago
Peter Johnson
3ce026a098
Remove & from function pointer references.
...
svn path=/trunk/yasm/; revision=135
24 years ago
Peter Johnson
7ba343f346
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.
svn path=/trunk/yasm/; revision=133
24 years ago
Peter Johnson
1fa31332b6
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).
svn path=/trunk/yasm/; revision=129
24 years ago
Peter Johnson
bb595a8f02
Formatting changes and starting to comment more heavily.
...
svn path=/trunk/yasm/; revision=128
24 years ago
Peter Johnson
6232670d62
Add unary precedence to some of the expression rules.
...
Add '+' as a unary operator.
Change target to use expr instead of just explabel.
svn path=/trunk/yasm/; revision=126
24 years ago
Peter Johnson
5ded7b9546
Move ..start in with ..@label.
...
svn path=/trunk/yasm/; revision=124
24 years ago
Peter Johnson
76af86221f
Move some previously seperate identifiers into general label handlers.
...
svn path=/trunk/yasm/; revision=123
24 years ago
Peter Johnson
fa5c9d5ea9
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).
svn path=/trunk/yasm/; revision=119
24 years ago
Michael Urman
c0eb4fac3e
Better and more generalized kludge for sliding $0.\d down.
...
svn path=/trunk/yasm/; revision=118
24 years ago
Michael Urman
c4d985f1ad
Integrate expression handling into memory address expressions.
...
Consequently change Imm->EA, and update DebugPrintBC (fix segvs too)
svn path=/trunk/yasm/; revision=117
24 years ago
Peter Johnson
bd6d5322e1
Fix and tighten down on validation regexps. Add support for 4th group
...
parameter.
svn path=/trunk/yasm/; revision=116
24 years ago
Peter Johnson
187eda1c36
Eliminate conflicts by setting associativity (and precedence too).
...
svn path=/trunk/yasm/; revision=115
24 years ago
Michael Urman
0cb10aa577
Fixed the non-ansi attempts to pass a union member casted as the union
...
type.
svn path=/trunk/yasm/; revision=113
24 years ago
Peter Johnson
daf5c6fd03
Enable and add support for (in gen_instr.pl) short xchg AX and EAX forms.
...
svn path=/trunk/yasm/; revision=112
24 years ago
Michael Urman
84bae30656
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.
svn path=/trunk/yasm/; revision=109
24 years ago
Peter Johnson
273a7b3c83
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?).
svn path=/trunk/yasm/; revision=108
24 years ago
Peter Johnson
7f30800f77
Allow opsize parameters, to eliminate !onebyte16 and !onebyte32.
...
svn path=/trunk/yasm/; revision=107
24 years ago