Peter Johnson
adf5a95e89
Add option for malloc debugging using dmalloc library ( http://dmalloc.com/ ).
...
Remove unnecessary stdlib includes (because we use xmalloc instead of malloc).
svn path=/trunk/yasm/; revision=297
24 years ago
Peter Johnson
21c598f9f8
Put in temporary implementations of ErrorAt() and WarningAt().
...
svn path=/trunk/yasm/; revision=296
24 years ago
Peter Johnson
e7bab50cf2
Parse NOSPLIT.
...
Move some work to subfunctions in expr so they can be used for both 16-bit
and 32-bit checking.
svn path=/trunk/yasm/; revision=295
24 years ago
Peter Johnson
121f93b0a0
*COMPLETELY* rewrite most of expression handling.
...
Features:
- More complex memory expressions like [bx-(bx-di)] are now calculated through
as valid.
- Much better simplification.
Internal changes:
- More flexible n-way tree (rather than old binary-only).
- Many new functions to simplify and deal with very complex expressions.
svn path=/trunk/yasm/; revision=294
24 years ago
Peter Johnson
b76d2cd490
Add other Makefiles, supporting files to EXTRA_DIST.
...
svn path=/trunk/yasm/; revision=293
24 years ago
Peter Johnson
0a98a74163
Add mergesort() replacement from BSD sources.
...
svn path=/trunk/yasm/; revision=292
24 years ago
Peter Johnson
cdcf358af1
RCSID() breaks under DJGPP because of "__unused". Removing __unused shouldn't
...
cause any problems, really, so just removed it.
svn path=/trunk/yasm/; revision=291
24 years ago
Peter Johnson
d9ea939762
Add "very flat" (based on Makefile.flat) makefiles and config.h files for
...
DJGPP and Visual C++. These are build-only (not development).
svn path=/trunk/yasm/; revision=290
24 years ago
Peter Johnson
b7bbbd5b81
Prototype, very simple, flat Makefile for use in compiling (but NOT developing)
...
on other platforms.
svn path=/trunk/yasm/; revision=289
24 years ago
Peter Johnson
e640f25da5
Update comment on disp.len to match changes in expr.c.
...
svn path=/trunk/yasm/; revision=288
24 years ago
Peter Johnson
43c736c2d8
Add parser finalization check for undefined symbols.
...
svn path=/trunk/yasm/; revision=287
24 years ago
Peter Johnson
e170a2f8b3
Add symrec_get_visibility().
...
svn path=/trunk/yasm/; revision=286
24 years ago
Peter Johnson
6ac7d95579
Call expr_expand_equ() on effective address from bytecode_parser_finalize().
...
svn path=/trunk/yasm/; revision=285
24 years ago
Peter Johnson
6a7504341f
Add _copy() constructor.
...
Add expr_expand_equ().
svn path=/trunk/yasm/; revision=284
24 years ago
Peter Johnson
0be7a0d444
Add first version of post-parsing bytecode finalization. Lots of work still
...
to be done at the bytecode and expression level.
svn path=/trunk/yasm/; revision=283
24 years ago
Peter Johnson
68c9dcc62c
Add several major functions, including effective address ModRM calculation
...
(only 16-bit is implemented at the moment) via expr_checkea().
svn path=/trunk/yasm/; revision=282
24 years ago
Peter Johnson
a83fc9c8f6
Change order of arguments for get_ and check_ functions to better match other
...
functions (floatnum * as first arg).
svn path=/trunk/yasm/; revision=281
24 years ago
Peter Johnson
c6d051a5f2
Allow both signed and unsigned interpretations for get_int and check_size.
...
Change argument order on get_int and check_size to better match other
functions (intnum * first arg).
svn path=/trunk/yasm/; revision=280
24 years ago
Peter Johnson
df1245459f
Add parsing of memory expressions. Currently adds a lot of duplication for
...
the expressions in the yacc code, but I don't see an easier way right now.
Also, no validity checking is done.
svn path=/trunk/yasm/; revision=279
24 years ago
Peter Johnson
8149291eca
Add expr_contains_float() and symrec_get_equ() functions. These are the first
...
of many functions like this which will be needed for advanced validity checking
in the finalization of the parser stage.
Fix yacc grammar to not use the (incorrect) expr_no_fltstr, and change memexp
to memexpr and its handling to prepare for memory expressions.
svn path=/trunk/yasm/; revision=278
24 years ago
Peter Johnson
053329a368
Clarify and fix some usages of valid/need flags for modrm and sib bytes.
...
In bytecode_print(), check for NULL ea displacement and print out modrm and
sib bytes in octal (because it's easier to read the 2/3/3 format in octal).
svn path=/trunk/yasm/; revision=277
24 years ago
Peter Johnson
1708da018a
Don't allow floats to be used as targets of jumps.
...
svn path=/trunk/yasm/; revision=276
24 years ago
Peter Johnson
84de990744
Support TIMES prefix. Split expr parsing to have a no-float and no-string
...
version (for times and reserve space).
svn path=/trunk/yasm/; revision=275
24 years ago
Peter Johnson
256511eea8
Fix conficts created when adding EQU.
...
svn path=/trunk/yasm/; revision=274
24 years ago
Peter Johnson
079c17a068
Fix handling of numeric constants ending in a single character (h,q,b).
...
svn path=/trunk/yasm/; revision=273
24 years ago
Peter Johnson
124177e635
Handle EQU. Handle BITS directive. Move directive handling out to separate
...
function.
svn path=/trunk/yasm/; revision=272
24 years ago
Peter Johnson
57a746069d
Remove NULL return checks; BitVector uses xmalloc(), so they aren't necessary.
...
svn path=/trunk/yasm/; revision=271
24 years ago
Peter Johnson
193392dcb6
Fix LOTS of little nits. Primary changes:
...
- New intnum module to replace using just unsigned long (for >32 bit values).
Read values using BitVector instead of strtoul().
- Brought both floatnum and intnum into expr (still need to integrate calc for
floatnum).
- Add traversal function to ternary tree (for use by symrec_foreach).
- Change floatnum output interface from single/double/extended to byte size.
- Try to make floatnum/intnum interfaces very similar. Still needs work.
- Add/fix *_print functions, including interating ones for sections/bytecodes.
- Fix handling of $ and $$. Both now are properly parsed and bytecode'd.
- Print out all sections and symbol table in main() in preparation for work
on "cleanup" functionality between parser and optimizer stages (really part
of the parser stage).
svn path=/trunk/yasm/; revision=270
24 years ago
Peter Johnson
840c0f169d
Output "real" version and package names (from config.h).
...
svn path=/trunk/yasm/; revision=269
24 years ago
Peter Johnson
2e04b1830a
Add BitVector_from_Oct() and tests for it.
...
svn path=/trunk/yasm/; revision=268
24 years ago
Peter Johnson
6e4b87ab46
Change comment to include im_ptr in list of things that cannot be reused or
...
changed after calling bytecode_new_insn().
svn path=/trunk/yasm/; revision=267
24 years ago
Peter Johnson
217b33802c
Make data.insn.imm within bytecode a pointer. This prevents leakage in calls to
...
bytecode_new_insn().
svn path=/trunk/yasm/; revision=266
24 years ago
Peter Johnson
fef39125bc
Use xmalloc() instead of malloc().
...
svn path=/trunk/yasm/; revision=265
24 years ago
Peter Johnson
c49daeab12
Move SymStatus and SymType to symrec.c from symrec.h. They're only used
...
internally.
svn path=/trunk/yasm/; revision=264
24 years ago
Peter Johnson
677d561c21
Fix SHR operation, and do some reindentation.
...
svn path=/trunk/yasm/; revision=263
24 years ago
Peter Johnson
eec0574a16
Use wordptr and charptr when appropriate for data when using BitVector functions.
...
Make some minor comment corrections.
svn path=/trunk/yasm/; revision=262
24 years ago
Peter Johnson
48a36cdf22
Make most data structures opaque, keeping internals truly internal and making the
...
overall structure much more modular.
The test files, which need access to the internals of the structures being
tested, now include the source file instead of the header file to gain access
to all internal formats and functions.
svn path=/trunk/yasm/; revision=261
24 years ago
Peter Johnson
ebc6a12111
Test floatnum_new().
...
svn path=/trunk/yasm/; revision=260
24 years ago
Peter Johnson
fb89878708
Const'ify floatnum_new() input string.
...
svn path=/trunk/yasm/; revision=259
24 years ago
Peter Johnson
55c7822fa5
Add floatnum_delete().
...
svn path=/trunk/yasm/; revision=258
24 years ago
Peter Johnson
17a9427734
Fix mantissa rounding overflow issue: 0xff -> 0x100, and shift right -> 0x80 is
...
not correct except when the 1 bit is explicit.
svn path=/trunk/yasm/; revision=257
24 years ago
Peter Johnson
8ce112a3fa
Completely revamp format and extensiveness of testing.
...
Currently two tests fail (the approx 1.e-38 in single and double precision).
Need still to add tests for ASCII->internal conversion.
svn path=/trunk/yasm/; revision=256
24 years ago
Peter Johnson
d312212211
Implement floatnum_print() (for debugging purposes only).
...
svn path=/trunk/yasm/; revision=255
24 years ago
Peter Johnson
055e7e2a30
Add copyright and GPL comments.
...
svn path=/trunk/yasm/; revision=254
24 years ago
Peter Johnson
b13f4e4f87
malloc->xmalloc, strdup->xstrdup, and calloc->xcalloc. The x* family performs
...
error checking. Remove check for strdup() from configure, as we don't need it.
svn path=/trunk/yasm/; revision=253
24 years ago
Peter Johnson
98e25fc1f6
Add some (optional through configure) additional warning flags. Add options
...
to configure to enable profiling and enable -Werror. Make changes to ensure
everything builds with all additional warnings and -Werror enabled. Most of
these changes consist of adding "const" modifiers for functions that get
constant literal strings.
svn path=/trunk/yasm/; revision=252
24 years ago
Peter Johnson
1377150f6e
Finish ASCII->internal FP conversion and clean up single/double/extended
...
conversion functions. For accuracy, change from 64-bit to 80-bit internal
mantissa. Modify tests to match new internal format.
TODO: Denormalized numbers, and write more tests!
svn path=/trunk/yasm/; revision=251
24 years ago
Peter Johnson
a46ed054f7
Check for NULL datavals to avoid crashes.
...
svn path=/trunk/yasm/; revision=250
24 years ago
Stanislav Karchebny
68de928435
Added command line parsing
...
svn path=/trunk/yasm/; revision=249
24 years ago
Peter Johnson
fb48401cc0
Add *Now and *At error and warning functions. *At functions still need to
...
be implemented. Consider a rename of these functions at some point?
svn path=/trunk/yasm/; revision=248
24 years ago