Peter Johnson
a4c2cb29ad
Reverse include and src directories to make sure config.h is built first.
...
svn path=/trunk/yasm/; revision=74
24 years ago
Peter Johnson
104ea94e7e
Remove bison.tab.h due to changes in src/Makefile.am.
...
svn path=/trunk/yasm/; revision=73
24 years ago
Peter Johnson
0664f90a20
Change lex and yacc filenames to match changes in Makefile.am.
...
svn path=/trunk/yasm/; revision=72
24 years ago
Peter Johnson
1a88edb466
Use bison.h instead of bison.tab.h to match changes to Makefile.am.
...
svn path=/trunk/yasm/; revision=71
24 years ago
Peter Johnson
e0f38d8cb7
Fix how lex and yacc are handled.
...
svn path=/trunk/yasm/; revision=70
24 years ago
Peter Johnson
93c75c63a5
Add additional checks: const, size_t, vprintf() family, strtoul, and toascii.
...
svn path=/trunk/yasm/; revision=69
24 years ago
Peter Johnson
82fba53e7f
Use toascii() again (now implemented in util.h if not present on system).
...
svn path=/trunk/yasm/; revision=68
24 years ago
Peter Johnson
bfd5122925
Add toascii() implementation.
...
svn path=/trunk/yasm/; revision=67
24 years ago
Peter Johnson
8a6e7a9d48
strtoul() implementation for systems that lack it (from BSD).
...
svn path=/trunk/yasm/; revision=66
24 years ago
Peter Johnson
5faba8f40f
Change copyright and code to match original UCB source.
...
svn path=/trunk/yasm/; revision=65
24 years ago
Peter Johnson
616bd61994
Use ANSI C compliant #ifndef wrappers (_A_H_ -> YASM_A_H).
...
svn path=/trunk/yasm/; revision=64
24 years ago
Peter Johnson
8073375839
Ignore aclocal/autoheader/autoconf/automake files.
...
svn path=/trunk/yasm/; revision=63
24 years ago
Peter Johnson
80c2b676be
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.
svn path=/trunk/yasm/; revision=62
24 years ago
Peter Johnson
6b93227482
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.
svn path=/trunk/yasm/; revision=61
24 years ago
Peter Johnson
96f144ba06
Remove unfinished expr.h from listed sources so that dist target works.
...
svn path=/trunk/yasm/; revision=60
24 years ago
Michael Urman
b2a40ce107
Removed unfinished expr.c from listed sources.
...
svn path=/trunk/yasm/; revision=59
24 years ago
Michael Urman
24e8365454
Initial checkin of automake/autoconf files.
...
Proper split directory builds may fail on the lex/yacc generated files.
svn path=/trunk/yasm/; revision=58
24 years ago
Michael Urman
d4405d9f9d
Removed to leave space for automake/autoconf generated one.
...
svn path=/trunk/yasm/; revision=57
24 years ago
Michael Urman
3a6d83db51
Initial checkin of automake/autoconf files.
...
Proper split directory builds may fail on the lex/yacc generated files.
svn path=/trunk/yasm/; revision=56
24 years ago
Peter Johnson
aee5071769
isascii -> implementation. This is ANSI C, but some headers don't believe it.
...
svn path=/trunk/yasm/; revision=55
24 years ago
Michael Urman
88bb350e0c
Added appropriate header for y_strdup. (oops)
...
svn path=/trunk/yasm/; revision=54
24 years ago
Michael Urman
18e368c82e
Added error for duplicate definitions of labels.
...
Changed strdup to y_strdup (ANSI compatibility).
svn path=/trunk/yasm/; revision=53
24 years ago
Peter Johnson
26e001cc18
toascii -> &= 0x7F for ANSI C compatibility.
...
svn path=/trunk/yasm/; revision=52
24 years ago
Michael Urman
a6ef33c04c
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)
svn path=/trunk/yasm/; revision=51
24 years ago
Peter Johnson
377786e785
Added util.o to dependencies.
...
svn path=/trunk/yasm/; revision=50
24 years ago
Peter Johnson
2141d4f43d
Initial check-in of utility functions.
...
svn path=/trunk/yasm/; revision=49
24 years ago
Peter Johnson
395bf7b97e
Changed bison.y and token.l build rule.
...
Added bison.y and token.l to "clean" target.
svn path=/trunk/yasm/; revision=48
24 years ago
Michael Urman
792bb9a471
Add error rule for all instructions.
...
svn path=/trunk/yasm/; revision=47
24 years ago
Peter Johnson
48587e3642
Implemented rcpss and fixed opcode encoding for rcpps.
...
svn path=/trunk/yasm/; revision=46
24 years ago
Peter Johnson
2489dedd3e
Realign table columns to allow enough space for the opcode.
...
Caveat: does make some lines >80 columns.
svn path=/trunk/yasm/; revision=45
24 years ago
Peter Johnson
8e49bef542
Use new interface functions in bytecode.c instead of writing values directly.
...
svn path=/trunk/yasm/; revision=44
24 years ago
Peter Johnson
4807c5b69b
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).
svn path=/trunk/yasm/; revision=43
24 years ago
Peter Johnson
c3137f3db3
Add multiple segment override/prefix warnings.
...
svn path=/trunk/yasm/; revision=42
24 years ago
Michael Urman
a100f712c7
Added third opcode byte
...
svn path=/trunk/yasm/; revision=41
24 years ago
Michael Urman
0fa549ffd6
more modular retrofitting
...
svn path=/trunk/yasm/; revision=40
24 years ago
Peter Johnson
e75125dae3
Moved from 2-byte to 3-byte opcodes.
...
svn path=/trunk/yasm/; revision=39
24 years ago
Michael Urman
f8f2a15796
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.
svn path=/trunk/yasm/; revision=38
24 years ago
Peter Johnson
d6c9ff56f0
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.
svn path=/trunk/yasm/; revision=37
24 years ago
Peter Johnson
8d656576e2
Added SetEASegment and SetEAAddressSize (not yet implemented).
...
svn path=/trunk/yasm/; revision=36
24 years ago
Peter Johnson
7f9f858b98
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.
svn path=/trunk/yasm/; revision=35
24 years ago
Peter Johnson
ae7bf9e54a
Brought @valid_regs up-to-date with bison.y.in.
...
svn path=/trunk/yasm/; revision=34
24 years ago
Peter Johnson
c07fec8b88
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).
svn path=/trunk/yasm/; revision=33
24 years ago
Michael Urman
d168b3bdd0
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.
svn path=/trunk/yasm/; revision=32
24 years ago
Peter Johnson
56e0ecdaad
Added bison.y and token.l (now dynamically generated).
...
svn path=/trunk/yasm/; revision=31
24 years ago
Peter Johnson
8bc6949d15
Added TO and segreg.
...
svn path=/trunk/yasm/; revision=30
24 years ago
Peter Johnson
e3fae72005
Added "TO".
...
svn path=/trunk/yasm/; revision=29
24 years ago
Michael Urman
c6274f1170
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.
svn path=/trunk/yasm/; revision=28
24 years ago
Michael Urman
2d86196037
Inserted /* @FOO@ */ markers for dynamic generation via gen_instr.pl.
...
svn path=/trunk/yasm/; revision=27
24 years ago
Michael Urman
728f4404e7
Added dynamic generation of token.l, bison.y from token.l.in, bison.y.in.
...
It's ugly, but it only generates once until new files exist.
svn path=/trunk/yasm/; revision=26
24 years ago
Peter Johnson
80d7b2347b
Repocopied to .in version in preparation for gen_instr.pl generation of
...
instruction components.
svn path=/trunk/yasm/; revision=25
24 years ago