Michael Urman
7c073b5c23
Add const char *in_filename arguments to
...
- preproc initialize function
- parser parse function (to pass to preproc initialize)
so that the preprocessor has a clue what file it's in.
svn path=/trunk/yasm/; revision=484
23 years ago
Michael Urman
6b65e7a522
Update main files to include support for yapp.
...
This includes defaulting to yapp for ./yasm -e passes.
svn path=/trunk/yasm/; revision=482
23 years ago
Peter Johnson
62750a30d3
Enhance bc_resolve() implementation a bit, but comment out, as this function
...
will probably disappear in the near future (its functionality will be handled
directly by the object format module without the need for another pass).
svn path=/trunk/yasm/; revision=481
23 years ago
Peter Johnson
5d2e9ea0f0
Allow preprocess-only and setting of preproc. Update main() and related
...
functions to be a bit more clean.
svn path=/trunk/yasm/; revision=479
23 years ago
Peter Johnson
0177d689a1
Revamp object format functional interface a bit. Now, only the output()
...
function gets a FILE *, and it's the only function that can write to a file.
The object file is thus not opened until AFTER parsing and most error checking
is complete. Necessitated adding a special case for the dbg object format
because it needs to output to the "object" (debug) file from essentially every
function. Added a global (debug_file) to support this.
svn path=/trunk/yasm/; revision=476
23 years ago
Peter Johnson
391736c2a6
Correct optimize() comment.
...
svn path=/trunk/yasm/; revision=470
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
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
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
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
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
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
ddacb97e3e
Don't shadow global (standard C) "index" (noticed by LCLint).
...
svn path=/trunk/yasm/; revision=429
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
1fc6d5b86d
Fix warnings that appear with -O turned on.
...
svn path=/trunk/yasm/; revision=416
24 years ago
Peter Johnson
73e3e69375
Add tests/Makefile.inc to EXTRA_DIST.
...
svn path=/trunk/yasm/; revision=415
24 years ago
Peter Johnson
f5358bb32e
Change EXTRA_DIST to reflect movement of strsep.c and mergesort.c.
...
svn path=/trunk/yasm/; revision=411
24 years ago
Peter Johnson
bea39dbe16
Add @LIBOBJS@ to library linkages (for missing functions).
...
svn path=/trunk/yasm/; revision=405
24 years ago
Peter Johnson
90864f6793
Bring up-to-date with new generated files (due to new build structure).
...
svn path=/trunk/yasm/; revision=398
24 years ago
Peter Johnson
ca6a1c8167
Massive build system change: single Makefile instead of recursive.
...
Note: still is automake-generated, but uses .inc files in the various
subdirectories instead of .am files.
TODO: Move arch-specific components of bytecode_test and memexpr_test to
arch/x86.
svn path=/trunk/yasm/; revision=395
24 years ago
Peter Johnson
0caf84d85f
Massive build system change: single Makefile instead of recursive.
...
Note: still is automake-generated, but uses .inc files in the various
subdirectories instead of .am files.
TODO: Move arch-specific components of bytecode_test and memexpr_test to
arch/x86.
svn path=/trunk/yasm/; revision=394
24 years ago
Peter Johnson
855891dac2
Fix build problem on Linux with toascii() define.
...
svn path=/trunk/yasm/; revision=393
24 years ago
Peter Johnson
2727869bd8
Start work on optimizer module. Moved all "post-parser-finalization" code
...
into the optimizer stage, where it belongs. Naming has changed, but most
implementations have not been brought up to date to do what they say they
do.
svn path=/trunk/yasm/; revision=388
24 years ago
Peter Johnson
0f852333df
LCLint-related comment fixes.
...
svn path=/trunk/yasm/; revision=387
24 years ago
Peter Johnson
ae85d1edb1
Add support for incbin pseudo-instruction.
...
svn path=/trunk/yasm/; revision=386
24 years ago
Peter Johnson
b3cb8c0292
Move assert.h include to util.h
...
In util.h, define NDEBUG if not running lint.
svn path=/trunk/yasm/; revision=385
24 years ago
Peter Johnson
e8d7d5cad9
Add opt_flags (space for use by the optimizer).
...
svn path=/trunk/yasm/; revision=384
24 years ago
Peter Johnson
69c42d7aaa
Plug memory leak in floatnum_new().
...
svn path=/trunk/yasm/; revision=383
24 years ago
Peter Johnson
f36a664a49
strcmp() returns 0 if the strings are equal.
...
svn path=/trunk/yasm/; revision=382
24 years ago
Peter Johnson
6bbcad2e6c
Make extension-replacement a utility function in file.c (as it will need to
...
be performed for the list file, etc, as well as the object file).
svn path=/trunk/yasm/; revision=381
24 years ago
Peter Johnson
7b4e6c09dc
Add support for NASM's %line.
...
svn path=/trunk/yasm/; revision=376
24 years ago
Peter Johnson
a64ee74f8f
Fix typo in HAVE_STRCMPI strncasecmp() #define.
...
svn path=/trunk/yasm/; revision=373
24 years ago