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
Michael Urman
fb3e968a29
Initial checkin of expression handling.
...
svn path=/trunk/yasm/; revision=106
24 years ago
Peter Johnson
7ffbf9829c
#0 and #1 -> @0 and @1 (for the CPU field), to avoid warning from Perl.
...
svn path=/trunk/yasm/; revision=102
24 years ago
Peter Johnson
1636cc2441
Backroll 1.12 and 1.13, they cause conflicts. We need to find a better way
...
to do this.
svn path=/trunk/yasm/; revision=100
24 years ago
Michael Urman
02594cb9da
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.
svn path=/trunk/yasm/; revision=99
24 years ago
Michael Urman
4053f1aaae
Updated validation regexps for $0.\d fields.
...
Removed obosolete commented "next unless ref $instr{$inst};"s
svn path=/trunk/yasm/; revision=98
24 years ago
Michael Urman
769e35a524
Removed use of "our," so as not to require perl 5.6
...
svn path=/trunk/yasm/; revision=97
24 years ago
Michael Urman
2630eece5f
Handle grouped instructions format.
...
svn path=/trunk/yasm/; revision=96
24 years ago
Peter Johnson
a8329fcb64
Add memref to declared types.
...
svn path=/trunk/yasm/; revision=91
24 years ago
Peter Johnson
619381bdb9
Change mem (other sized memory reference) to cause operand size mismatch error
...
if a size is specified.
svn path=/trunk/yasm/; revision=87
24 years ago
Peter Johnson
e796094e1c
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.
svn path=/trunk/yasm/; revision=79
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
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
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
Michael Urman
792bb9a471
Add error rule for all instructions.
...
svn path=/trunk/yasm/; revision=47
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
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
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
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
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
Peter Johnson
7ae09b88b7
Implemented dynamic argument types for error and warning messages.
...
svn path=/trunk/yasm/; revision=19
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
2ddc3208dc
Merge immediate and relative structures.
...
svn path=/trunk/yasm/; revision=11
24 years ago
Peter Johnson
2fdefb7a66
Initial check-in.
...
Contains hardcoded instructions that should be dynamically generated.
svn path=/trunk/yasm/; revision=5
24 years ago