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
Peter Johnson
8b5a407ef2
Need to zero need_modrm in BuildBC_Insn() if no EA.
...
svn path=/trunk/yasm/; revision=24
24 years ago
Peter Johnson
5c43534651
Added .cvsignore for src and include directories.
...
svn path=/trunk/yasm/; revision=23
24 years ago
Peter Johnson
e9bd95fd96
Added conversion from immediate value to effective address. Used for enter
...
instruction (which takes two immediate values).
To facilitate this change, changed meaning of "len" in bytecode structure
to be only the length of the offset (from being 1+length, the 1 being for the
Mod/RM byte), and added a need_modrm flag similar to the need_sib flag in
functionality.
svn path=/trunk/yasm/; revision=22
24 years ago
Peter Johnson
a750e39454
Added warning for "value exceeds bounds".
...
svn path=/trunk/yasm/; revision=21
24 years ago
Michael Urman
3e9f321b66
Reformatted BuildBC_Insn's argument list to aligned one arg per line.
...
svn path=/trunk/yasm/; revision=20
24 years ago
Peter Johnson
7ae09b88b7
Implemented dynamic argument types for error and warning messages.
...
svn path=/trunk/yasm/; revision=19
24 years ago
Peter Johnson
b67271e39b
Fix syntax of main() definition.
...
Return EXIT_SUCCESS instead of 0 for portability.
svn path=/trunk/yasm/; revision=18
24 years ago
Peter Johnson
4c34b9b6d7
Fixed regex match for DIRECTIVE_VAL.
...
svn path=/trunk/yasm/; revision=17
24 years ago
Peter Johnson
bc2b7f3194
Changed implementation of directives. Added some rudimentary error checking.
...
svn path=/trunk/yasm/; revision=16
24 years ago
Peter Johnson
c1c9e2fdf7
yyerror() moved to errwarn.c. Changed file comment to reflect that error
...
and warning code is not in this file.
svn path=/trunk/yasm/; revision=15
24 years ago
Peter Johnson
0049890bf1
Added errwarn.o to dependencies (error and warning reporting).
...
svn path=/trunk/yasm/; revision=14
24 years ago
Peter Johnson
19688f76f7
Initial check-in. Still need to implement dynamic argument typing.
...
svn path=/trunk/yasm/; revision=13
24 years ago
Peter Johnson
61465617aa
Removed accidental garbage in last commit.
...
svn path=/trunk/yasm/; revision=12
24 years ago
Peter Johnson
2ddc3208dc
Merge immediate and relative structures.
...
svn path=/trunk/yasm/; revision=11
24 years ago