Peter Johnson
01481e7d47
Test circular reference detection. Very basic examples from NASM's docs on
...
critical expressions.
NASM behavior: 1-3 fail, 4 generates a 4-byte offset in the memory expression.
YASM behavior: 1&2 fail (and rightfully so :), 3 works as expected, and 4
generates a 1-byte offset.
svn path=/trunk/yasm/; revision=473
23 years ago
Peter Johnson
964c755067
Indicate actual line number of circular reference error.
...
svn path=/trunk/yasm/; revision=472
23 years ago
Peter Johnson
7217fd10db
Bring up-to-date with traverse function changes. Start trying to check for
...
circular references.
svn path=/trunk/yasm/; revision=471
23 years ago
Peter Johnson
391736c2a6
Correct optimize() comment.
...
svn path=/trunk/yasm/; revision=470
23 years ago
Peter Johnson
f781881f80
Terminate & cleanup early if an error occurs during the optimization phase.
...
svn path=/trunk/yasm/; revision=469
23 years ago
Peter Johnson
8a515e968a
Reverse how traverse functions do early termination (now, they terminate on
...
a non-zero func return and return the value func returned). Document the
changes in the header files.
svn path=/trunk/yasm/; revision=468
23 years ago
Peter Johnson
4f7daa4d39
Fix issue with how symrec's are handled when an expression is copied: old code
...
just assigned the pointer: but the symrec is deleted (if it's not in the symbol
table) when the expr is deleted. Thus, we need to create a copy of the symrec
instead of just reusing the same value if it's going to be deleted later. This
trickles down to objfmt to copy the objfmt-local data.
svn path=/trunk/yasm/; revision=467
23 years ago
Peter Johnson
2f20fc4846
Added --version option. Pass option descriptions, --help, and --version
...
messages through gettext. Rework handling of --version and --help.
svn path=/trunk/yasm/; revision=466
23 years ago
Peter Johnson
90625f71e1
Add semicolon at end of error handling code to fix syntax errors. Only seen
...
on Cygwin so far, but a legitimate error.
svn path=/trunk/yasm/; revision=465
23 years ago
Peter Johnson
7462e32ecf
Bring up-to-date with tree and build changes.
...
svn path=/trunk/yasm/; revision=464
23 years ago
Peter Johnson
ef3eff4f62
Enhance error/warning framework by allowing specific warnings to be disabled,
...
all warnings to be disabled, and warnings to be treated as errors, much in the
style of GNU tools such as gcc.
svn path=/trunk/yasm/; revision=463
23 years ago
Peter Johnson
cf48f57fca
Check for param=NULL before dereferencing it in sopt case.
...
svn path=/trunk/yasm/; revision=462
23 years ago
Peter Johnson
f61b5746f1
Don't compact into a short form if one's not available.
...
svn path=/trunk/yasm/; revision=461
23 years ago
Peter Johnson
044cc90233
Make jcc's default to JR_SHORT in NASM syntax, and test for this possibility
...
in calc_len().
svn path=/trunk/yasm/; revision=460
23 years ago
Peter Johnson
056b3fc52c
Finish bc_calc_len(), with fixes to x86_bc_calc_len_insn()'s EA sizing calcs,
...
and implementation of x86_bc_calc_len_jmprel().
svn path=/trunk/yasm/; revision=459
23 years ago
Peter Johnson
760e3c4d11
In optimize_bytecode(), calculate bc->offset *before* calling bc_calc_len().
...
This is because calc_len may want to know the current bytecode's offset (eg for
determining relative displacement length).
svn path=/trunk/yasm/; revision=458
23 years ago
Peter Johnson
66bf6be085
Implement rest of bc_calc_len for general bytecodes.
...
svn path=/trunk/yasm/; revision=457
23 years ago
Peter Johnson
5b2166d50a
Don't store "determined" immediate len and neg. Both will be determined from
...
the expr when that's actually possible.
svn path=/trunk/yasm/; revision=456
23 years ago
Peter Johnson
6d69fd09ba
Add comment about bc_calc_len() possibly returning -1.
...
svn path=/trunk/yasm/; revision=455
23 years ago
Peter Johnson
4949569151
Fix memory leak.
...
Add assert call to silence LCLint.
svn path=/trunk/yasm/; revision=454
23 years ago
Peter Johnson
3c0a749084
Rework resolve_label() and add a second pass.
...
svn path=/trunk/yasm/; revision=453
23 years ago
Peter Johnson
ee74365f05
Add new bc_resolve() family, and rewrite calc_len to /just/ calculate the
...
length, not modify anything else (particularly expressions w/temp. resolved
labels).
svn path=/trunk/yasm/; revision=452
23 years ago
Peter Johnson
4d77fa5b6b
Add bcs_next (STAILQ_NEXT).
...
svn path=/trunk/yasm/; revision=451
23 years ago
Peter Johnson
ca1fdd915b
Add bcs_first() (STAILQ_FIRST).
...
svn path=/trunk/yasm/; revision=450
23 years ago
Peter Johnson
2258d80f96
Tiny formatting fix.
...
svn path=/trunk/yasm/; revision=449
23 years ago
Peter Johnson
cc635cc237
Change return type of calc_len() family back to int from unsigned long.
...
svn path=/trunk/yasm/; revision=448
23 years ago
Peter Johnson
0276a2db37
- Use new symrec_get_label().
...
- Change optimize() function to return void.
- Pass LCLint.
svn path=/trunk/yasm/; revision=447
23 years ago
Peter Johnson
ef801289fd
Add basic optimizer to checks.
...
svn path=/trunk/yasm/; revision=446
23 years ago
Peter Johnson
a3db6e7106
Remove symrec_get_int_value(), add symrec_get_label().
...
svn path=/trunk/yasm/; revision=445
23 years ago
Peter Johnson
746f2ef74f
General code cleanup.
...
svn path=/trunk/yasm/; revision=444
23 years ago
Peter Johnson
985d4e9b59
LCLint cleanups.
...
svn path=/trunk/yasm/; revision=443
23 years ago
Michael Urman
04b27087a9
Fix one line odd error: missing initialization of step.
...
svn path=/trunk/yasm/; revision=442
23 years ago
Peter Johnson
f243b4d652
Be nice for debugging purposes and set effaddr sib=0 even when it's not valid.
...
svn path=/trunk/yasm/; revision=441
23 years ago
Peter Johnson
e23d88b957
Make resolve_label() take a symrec * instead of a section * and bytecode *.
...
Extend expr_expand_equ() into expr_expand_labelequ() and call resolve_label()
here.
svn path=/trunk/yasm/; revision=440
23 years ago
Peter Johnson
fea731d3eb
Remove unused variable declaration.
...
svn path=/trunk/yasm/; revision=439
23 years ago
Michael Urman
2814d5cf22
Change from linked list to vector representation for line mapping.
...
svn path=/trunk/yasm/; revision=438
23 years ago
Peter Johnson
fbf87da90a
Comment fix.
...
svn path=/trunk/yasm/; revision=437
23 years ago
Peter Johnson
e2f2ede90c
bc_calc_len() family should return unsigned long, not int.
...
svn path=/trunk/yasm/; revision=436
23 years ago
Peter Johnson
04ed33ca73
Cut bitvect allocations even more by making a bitvect_from_Dec_static() and
...
associated _Boot and _Shutdown.
svn path=/trunk/yasm/; revision=435
23 years ago
Peter Johnson
beba182469
Allocate single static temporary bitvect for conversions (as most conversions
...
will be <=32 bits in size).
svn path=/trunk/yasm/; revision=434
23 years ago
Peter Johnson
057cfd62e9
dmalloc is enabled with DMALLOC, not DDMALLOC.
...
svn path=/trunk/yasm/; revision=433
23 years ago
Peter Johnson
d265748dcc
dmalloc is enabled with DMALLOC, not DDMALLOC.
...
svn path=/trunk/yasm/; revision=432
23 years ago
Peter Johnson
dd1654d62f
Free in_filename.
...
svn path=/trunk/yasm/; revision=431
23 years ago
Peter Johnson
ddacb97e3e
Don't shadow global (standard C) "index" (noticed by LCLint).
...
svn path=/trunk/yasm/; revision=429
23 years ago
Peter Johnson
5ad58cef6b
Correct for renamed/moved files.
...
svn path=/trunk/yasm/; revision=428
23 years ago
Peter Johnson
8857243d8a
LCLint-inspired cleanups.
...
svn path=/trunk/yasm/; revision=427
23 years ago
Peter Johnson
44a3d08815
Line number is a long (found by lclint).
...
svn path=/trunk/yasm/; revision=426
23 years ago
Peter Johnson
3f2186c1bf
Change from current file/line dual storage to a monotonically-increasing line
...
"index". This fixes some problems with assumptions made by various parts of
the code that are invalidated when the line number doesn't always increase (eg.
when the NASM %line directive is used).
Speed fixes are needed to the implementation of the line_* functions in
globals.c before this is finished.
svn path=/trunk/yasm/; revision=424
23 years ago
Peter Johnson
587a05e3eb
Remove programmer documentation out of source tree and into the yasm-doc CVS
...
module. Since user documentation is going to be the only doc/ stuff, get rid
of user subdirectory. Eliminate top-level doc/Makefile.am as user doc
generation will be integrated into top-level Makefile.am (or maybe
doc/Makefile.inc).
svn path=/trunk/yasm/; revision=419
24 years ago
Peter Johnson
01208b3739
Remove programmer documentation out of source tree and into the yasm-doc CVS
...
module. Since user documentation is going to be the only doc/ stuff, get rid
of user subdirectory. Eliminate top-level doc/Makefile.am as user doc
generation will be integrated into top-level Makefile.am (or maybe
doc/Makefile.inc).
svn path=/trunk/yasm/; revision=418
24 years ago