]> granicus.if.org Git - yasm/log
yasm
23 years agoDon't free EA when simplifying shift_op case. Not only is this code completely
Peter Johnson [Sat, 1 Dec 2001 06:15:58 +0000 (06:15 -0000)]
Don't free EA when simplifying shift_op case.  Not only is this code completely
wrong (the ModRM byte definitely must be kept), but it had a memory leak too
(it just freed the ea without calling expr_delete())!

svn path=/trunk/yasm/; revision=367

23 years agoFix bug with ONE generation (overwrote both [0] and [1] indexes with opcode
Peter Johnson [Sat, 1 Dec 2001 06:10:19 +0000 (06:10 -0000)]
Fix bug with ONE generation (overwrote both [0] and [1] indexes with opcode
for ONE version).

svn path=/trunk/yasm/; revision=366

23 years agoChange dbg optimizer to basic.
Peter Johnson [Sat, 1 Dec 2001 05:47:12 +0000 (05:47 -0000)]
Change dbg optimizer to basic.

svn path=/trunk/yasm/; revision=365

23 years agoDelete dbg optimizer (won't be useful) and add "basic" (equiv. to NASM 2-pass)
Peter Johnson [Sat, 1 Dec 2001 03:07:23 +0000 (03:07 -0000)]
Delete dbg optimizer (won't be useful) and add "basic" (equiv. to NASM 2-pass)
optimizer.

svn path=/trunk/yasm/; revision=364

23 years agoSwitch from using ternary tree to Hash Array Mapped Trie (HAMT), which has
Peter Johnson [Mon, 26 Nov 2001 17:37:09 +0000 (17:37 -0000)]
Switch from using ternary tree to Hash Array Mapped Trie (HAMT), which has
*much* less overhead.
XXX: current implementation of HAMT is *not* portable due to pointer alignment
restrictions (it uses the LSB of a pointer to store a flag).  Need to write a
portable (if not so space-efficient) equivalent.

svn path=/trunk/yasm/; revision=363

23 years agoGeneral tests of directives.
Peter Johnson [Wed, 21 Nov 2001 08:42:56 +0000 (08:42 -0000)]
General tests of directives.

svn path=/trunk/yasm/; revision=362

23 years agoTest the imm and imm8x forms of add.
Peter Johnson [Wed, 21 Nov 2001 08:42:41 +0000 (08:42 -0000)]
Test the imm and imm8x forms of add.

svn path=/trunk/yasm/; revision=361

23 years agoAdd two larger NASM-preprocessed files from UIUC ECE 291's PModeLib as more
Peter Johnson [Wed, 21 Nov 2001 08:41:53 +0000 (08:41 -0000)]
Add two larger NASM-preprocessed files from UIUC ECE 291's PModeLib as more
typical assembly files.

svn path=/trunk/yasm/; revision=360

23 years agoTest global/common sharing in addition to extern.
Peter Johnson [Wed, 21 Nov 2001 08:40:15 +0000 (08:40 -0000)]
Test global/common sharing in addition to extern.

svn path=/trunk/yasm/; revision=359

23 years agoHow does NASM's bin format handle sections?
Peter Johnson [Wed, 21 Nov 2001 08:39:35 +0000 (08:39 -0000)]
How does NASM's bin format handle sections?

svn path=/trunk/yasm/; revision=358

23 years agoMassive cleanup of debugging output (via _print() functions). All now take
Peter Johnson [Wed, 21 Nov 2001 08:25:09 +0000 (08:25 -0000)]
Massive cleanup of debugging output (via _print() functions).  All now take
FILE *'s to print to somewhere other than stdout, and the formatting is
improved through the use of a global indent_level.

Changes to main() include the ability to specify an output file.

svn path=/trunk/yasm/; revision=357

23 years agoPolish up most directive support. This necessitated adding objfmt-specific
Peter Johnson [Wed, 21 Nov 2001 03:17:43 +0000 (03:17 -0000)]
Polish up most directive support.  This necessitated adding objfmt-specific
data pointers to symrec for extern/common/etc.  Also fixed parsing of direxpr;
it didn't allow exprs with ID's before.

svn path=/trunk/yasm/; revision=356

23 years agoAdd vps_next().
Peter Johnson [Wed, 21 Nov 2001 03:15:42 +0000 (03:15 -0000)]
Add vps_next().

svn path=/trunk/yasm/; revision=355

23 years agoAllow multiple EXTERN's of same variable without error (NASM's behavior).
Peter Johnson [Tue, 20 Nov 2001 23:30:19 +0000 (23:30 -0000)]
Allow multiple EXTERN's of same variable without error (NASM's behavior).

svn path=/trunk/yasm/; revision=354

23 years agoDon't do REG_E?AX combining with reg8/reg8x instructions, to allow things like
Peter Johnson [Tue, 20 Nov 2001 21:02:17 +0000 (21:02 -0000)]
Don't do REG_E?AX combining with reg8/reg8x instructions, to allow things like
"ADD AX, byte 8" to generate the same code as NASM does (OT: this doesn't save
any space because the reg8x form needs a ModRM, but if it's what the user
wants, do it).

svn path=/trunk/yasm/; revision=353

23 years agoPlug memory leak in dvs_delete().
Peter Johnson [Mon, 19 Nov 2001 07:43:26 +0000 (07:43 -0000)]
Plug memory leak in dvs_delete().

svn path=/trunk/yasm/; revision=352

23 years agoPrint "undefined symbol" message for all undefined symbols. Also make a little
Peter Johnson [Mon, 19 Nov 2001 06:47:14 +0000 (06:47 -0000)]
Print "undefined symbol" message for all undefined symbols.  Also make a little
nicer output by only outputting the "reported only once" informational message
once, for the first (line-wise) error.
Note: this isn't foolproof, as different files have different line countings...
need a monotonically increasing "line" counter to fix this.  This is a problem
in more areas than just here, though.

svn path=/trunk/yasm/; revision=351

23 years agoBugfix in expr_copy_except(): could allocate less than 2 terms of space (eg,
Peter Johnson [Mon, 19 Nov 2001 06:31:41 +0000 (06:31 -0000)]
Bugfix in expr_copy_except(): could allocate less than 2 terms of space (eg,
actually smaller than the structure).

svn path=/trunk/yasm/; revision=350

23 years agoDon't print out *all* bytecodes in the label's section for every label!
Peter Johnson [Mon, 19 Nov 2001 05:48:54 +0000 (05:48 -0000)]
Don't print out *all* bytecodes in the label's section for every label!

svn path=/trunk/yasm/; revision=349

23 years agoIn bytecode_print(), fix checks for short/near opcode printouts.
Peter Johnson [Mon, 19 Nov 2001 05:48:04 +0000 (05:48 -0000)]
In bytecode_print(), fix checks for short/near opcode printouts.

svn path=/trunk/yasm/; revision=348

23 years agoFix hexidecimal number handling. It was only allowing numbers starting with 0.
Peter Johnson [Mon, 19 Nov 2001 05:23:00 +0000 (05:23 -0000)]
Fix hexidecimal number handling.  It was only allowing numbers starting with 0.

svn path=/trunk/yasm/; revision=347

23 years agoRevert previous changes (which turned on -v), it was accidentally committed.
Peter Johnson [Mon, 19 Nov 2001 05:00:50 +0000 (05:00 -0000)]
Revert previous changes (which turned on -v), it was accidentally committed.

svn path=/trunk/yasm/; revision=346

23 years agoDon't try to redefine a label for an already existing segment. Thus, add a
Peter Johnson [Mon, 19 Nov 2001 04:25:44 +0000 (04:25 -0000)]
Don't try to redefine a label for an already existing segment.  Thus, add a
return flag from sections_switch_general() to indicate if the segment is new,
which is checked in objfmt_sections_switch().

svn path=/trunk/yasm/; revision=345

23 years agoFix a memory re-free issue in nasm_parser_directive(). vp->param was passed
Peter Johnson [Mon, 19 Nov 2001 04:15:22 +0000 (04:15 -0000)]
Fix a memory re-free issue in nasm_parser_directive().  vp->param was passed
to a function that keeps the pointer, and then the pointer is freed.  Whoops!

svn path=/trunk/yasm/; revision=344

23 years ago- Greatly enhance capabilities of directives (they're actually parsed now).
Peter Johnson [Mon, 19 Nov 2001 03:27:56 +0000 (03:27 -0000)]
- Greatly enhance capabilities of directives (they're actually parsed now).
  objfmt interface changed a lot due to this.
- New variables cur_objfmt and cur_parser that define what objfmt/parser are
  active.  They're set in main() by searching through the list of objfmts and
  parsers.  This necessitated libyasm.a to be listed twice in LDADD.

svn path=/trunk/yasm/; revision=343

23 years agoChange val to be a string instead of an expr.
Peter Johnson [Mon, 19 Nov 2001 03:24:40 +0000 (03:24 -0000)]
Change val to be a string instead of an expr.

svn path=/trunk/yasm/; revision=342

23 years agoBetter LCLint settings for x86_bc_insn_get_ea().
Peter Johnson [Mon, 19 Nov 2001 03:23:45 +0000 (03:23 -0000)]
Better LCLint settings for x86_bc_insn_get_ea().

svn path=/trunk/yasm/; revision=341

23 years agoAdd valparam data structure.
Peter Johnson [Sun, 18 Nov 2001 18:44:26 +0000 (18:44 -0000)]
Add valparam data structure.

svn path=/trunk/yasm/; revision=340

23 years agoDon't set nasm_parser_debug (as we'll soon not define YYDEBUG in bison.y.in).
Peter Johnson [Sun, 18 Nov 2001 15:53:20 +0000 (15:53 -0000)]
Don't set nasm_parser_debug (as we'll soon not define YYDEBUG in bison.y.in).

svn path=/trunk/yasm/; revision=339

23 years agoNew function: expr_get_symrec().
Peter Johnson [Sun, 18 Nov 2001 15:51:47 +0000 (15:51 -0000)]
New function: expr_get_symrec().

svn path=/trunk/yasm/; revision=338

23 years agoAdd symrec_delete() for deleting non-table symbols. Use it from expr_delete().
Peter Johnson [Sun, 18 Nov 2001 07:06:05 +0000 (07:06 -0000)]
Add symrec_delete() for deleting non-table symbols.  Use it from expr_delete().
Also allow the sect for labels to be NULL (special case for new directive
handling code).

svn path=/trunk/yasm/; revision=337

23 years agoDecided to go ahead and commit these little NASM-syntax test files I've been
Peter Johnson [Sat, 17 Nov 2001 08:39:14 +0000 (08:39 -0000)]
Decided to go ahead and commit these little NASM-syntax test files I've been
using for testing various things during development.  Many don't even actually
assemble, as they're testing error conditions.  These all need to be integrated
into a test suite at some point to be truly useful.

svn path=/trunk/yasm/; revision=336

23 years agoModify so that almost everything passes LCLint with the options in lclint.sh.
Peter Johnson [Sat, 17 Nov 2001 08:33:23 +0000 (08:33 -0000)]
Modify so that almost everything passes LCLint with the options in lclint.sh.
This is actually worthwhile; I found and fixed a few bugs/edge cases while
doing this.
For more information on LCLint, see <http://lclint.cs.virginia.edu/>.

svn path=/trunk/yasm/; revision=335

23 years agoAdd RCSID().
Peter Johnson [Fri, 16 Nov 2001 22:58:43 +0000 (22:58 -0000)]
Add RCSID().

svn path=/trunk/yasm/; revision=334

23 years agoClean up to pass lclint.
Peter Johnson [Fri, 16 Nov 2001 22:56:33 +0000 (22:56 -0000)]
Clean up to pass lclint.

svn path=/trunk/yasm/; revision=333

23 years agoAllow symrec_foreach return value to be ignored (in lclint).
Peter Johnson [Fri, 16 Nov 2001 22:56:09 +0000 (22:56 -0000)]
Allow symrec_foreach return value to be ignored (in lclint).

svn path=/trunk/yasm/; revision=332

23 years agolclint-ize gettext().
Peter Johnson [Fri, 16 Nov 2001 22:55:26 +0000 (22:55 -0000)]
lclint-ize gettext().

svn path=/trunk/yasm/; revision=331

23 years agoFix some nits found by lclint. Still something weird going on with list2 in
Peter Johnson [Fri, 16 Nov 2001 22:05:24 +0000 (22:05 -0000)]
Fix some nits found by lclint.  Still something weird going on with list2 in
mergesort(), according to lclint, but I haven't figured out if it's real or
not.

svn path=/trunk/yasm/; revision=330

23 years agoAdd some lclint annotations.
Peter Johnson [Fri, 16 Nov 2001 22:04:31 +0000 (22:04 -0000)]
Add some lclint annotations.

svn path=/trunk/yasm/; revision=329

23 years agoSplit away x86-specific parts of expression handling (eg, effective address ->
Peter Johnson [Thu, 15 Nov 2001 23:44:41 +0000 (23:44 -0000)]
Split away x86-specific parts of expression handling (eg, effective address ->
ModRM+SIB).

svn path=/trunk/yasm/; revision=328

23 years agoFix file comment.
Peter Johnson [Tue, 13 Nov 2001 23:02:54 +0000 (23:02 -0000)]
Fix file comment.

svn path=/trunk/yasm/; revision=327

23 years agoUpdate to match tree changes.
Peter Johnson [Thu, 8 Nov 2001 19:53:21 +0000 (19:53 -0000)]
Update to match tree changes.

svn path=/trunk/yasm/; revision=326

23 years agoUpdate to match tree changes.
Peter Johnson [Wed, 7 Nov 2001 21:50:33 +0000 (21:50 -0000)]
Update to match tree changes.

svn path=/trunk/yasm/; revision=325

23 years agoMaintain 'latest' symlink.
Peter Johnson [Mon, 5 Nov 2001 15:50:48 +0000 (15:50 -0000)]
Maintain 'latest' symlink.

svn path=/trunk/yasm/; revision=324

23 years agoAdd nightly build script.
Peter Johnson [Mon, 5 Nov 2001 09:14:19 +0000 (09:14 -0000)]
Add nightly build script.

svn path=/trunk/yasm/; revision=323

23 years agoBring in depcomp from Automake 1.5.
Peter Johnson [Mon, 5 Nov 2001 08:20:39 +0000 (08:20 -0000)]
Bring in depcomp from Automake 1.5.

svn path=/trunk/yasm/; revision=322

23 years agoRun with -a so that any missing files get added instead of just failing.
Peter Johnson [Mon, 5 Nov 2001 08:18:52 +0000 (08:18 -0000)]
Run with -a so that any missing files get added instead of just failing.

svn path=/trunk/yasm/; revision=321

23 years agoFix AC_REPLACE_FUNCS handling for tests as well as src/ by putting LIBOBJS
Peter Johnson [Mon, 5 Nov 2001 08:17:22 +0000 (08:17 -0000)]
Fix AC_REPLACE_FUNCS handling for tests as well as src/ by putting LIBOBJS
into libyasm.a instead of just for the yasm target.

svn path=/trunk/yasm/; revision=320

23 years agoHopefully fix problem with including replacement functions.
Peter Johnson [Mon, 5 Nov 2001 07:57:37 +0000 (07:57 -0000)]
Hopefully fix problem with including replacement functions.

svn path=/trunk/yasm/; revision=319

23 years agoAdd mergesort.c and strsep.c to EXTRA_DIST.
Peter Johnson [Mon, 5 Nov 2001 07:45:15 +0000 (07:45 -0000)]
Add mergesort.c and strsep.c to EXTRA_DIST.

svn path=/trunk/yasm/; revision=318

23 years agoAdd autogen script to make building straight from CVS easier.
Peter Johnson [Mon, 5 Nov 2001 07:22:22 +0000 (07:22 -0000)]
Add autogen script to make building straight from CVS easier.

svn path=/trunk/yasm/; revision=317

23 years agoSplit x86-specific stuff away from bytecode.
Peter Johnson [Mon, 5 Nov 2001 05:49:19 +0000 (05:49 -0000)]
Split x86-specific stuff away from bytecode.

svn path=/trunk/yasm/; revision=316

23 years agoChange PERL line to reflect instrs.dat move.
Peter Johnson [Sat, 3 Nov 2001 06:25:40 +0000 (06:25 -0000)]
Change PERL line to reflect instrs.dat move.

svn path=/trunk/yasm/; revision=315

23 years agoStart framework for separating architecture-dependent functions and data
Peter Johnson [Sat, 3 Nov 2001 06:22:55 +0000 (06:22 -0000)]
Start framework for separating architecture-dependent functions and data
structures from the rest of the assembler.  We're not trying to write GAS
here (yet :), but doing this will make large parts of the codebase a lot
clearer.

svn path=/trunk/yasm/; revision=314

23 years agoAdd coretype.h, make util.h do a lot more, use util.h to simplify include
Peter Johnson [Sat, 3 Nov 2001 05:17:51 +0000 (05:17 -0000)]
Add coretype.h, make util.h do a lot more, use util.h to simplify include
sections of C files.  Also remove IdPath from top comment in files where
RCSID() is used.  Move RCSID() to immediately after util.h include.

svn path=/trunk/yasm/; revision=313

23 years agobytecode_print(): Change how NULL values are output for imm and multiple.
Peter Johnson [Sat, 3 Nov 2001 04:13:42 +0000 (04:13 -0000)]
bytecode_print(): Change how NULL values are output for imm and multiple.
bytecode_parser_finalize_insn(): Add some preliminary imm handling.  Handle
shift_op special-casing (,1 hack).

svn path=/trunk/yasm/; revision=312

23 years agoConditional x* prototypes on !DMALLOC (as they're defined by dmalloc.h if
Peter Johnson [Sat, 3 Nov 2001 04:11:22 +0000 (04:11 -0000)]
Conditional x* prototypes on !DMALLOC (as they're defined by dmalloc.h if
DMALLOC is enabled).

svn path=/trunk/yasm/; revision=311

23 years agoOptimize expression building a bit in expr_new() by eliminating IDENT's here.
Peter Johnson [Thu, 1 Nov 2001 03:51:26 +0000 (03:51 -0000)]
Optimize expression building a bit in expr_new() by eliminating IDENT's here.
This saves a lot of extra unnecessary recursions when the expr gets to the
simplification stage.

svn path=/trunk/yasm/; revision=310

23 years agoAdd memory expressions tests (checkea).
Peter Johnson [Thu, 1 Nov 2001 02:36:22 +0000 (02:36 -0000)]
Add memory expressions tests (checkea).
Split off errwarn functions so that they can be overridden in test cases.

svn path=/trunk/yasm/; revision=309

23 years agoFix errors found in expr_level_op() and checkea_calc_displen() by new test
Peter Johnson [Thu, 1 Nov 2001 02:34:54 +0000 (02:34 -0000)]
Fix errors found in expr_level_op() and checkea_calc_displen() by new test
cases.

svn path=/trunk/yasm/; revision=308

23 years agoFix directive memory leaks in a different way; the old way broke name/val
Peter Johnson [Thu, 1 Nov 2001 00:24:09 +0000 (00:24 -0000)]
Fix directive memory leaks in a different way; the old way broke name/val
splitting.

svn path=/trunk/yasm/; revision=307

23 years agoMissed a free->xfree conversion.
Peter Johnson [Wed, 31 Oct 2001 22:08:25 +0000 (22:08 -0000)]
Missed a free->xfree conversion.

svn path=/trunk/yasm/; revision=306

23 years agoPrevious commit broke ANSI C header checking (BAD). Fixed, by changing how
Peter Johnson [Wed, 31 Oct 2001 22:06:48 +0000 (22:06 -0000)]
Previous commit broke ANSI C header checking (BAD).  Fixed, by changing how
optional things are checked.

svn path=/trunk/yasm/; revision=305

23 years agoUpdate with changes made to source tree and configure options.
Peter Johnson [Tue, 30 Oct 2001 04:32:10 +0000 (04:32 -0000)]
Update with changes made to source tree and configure options.

svn path=/trunk/yasm/; revision=304

23 years agoCorrectly process 32-bit memory expressions in expr_checkea().
Peter Johnson [Mon, 29 Oct 2001 10:25:44 +0000 (10:25 -0000)]
Correctly process 32-bit memory expressions in expr_checkea().

svn path=/trunk/yasm/; revision=303

23 years agoOn xfree(NULL), just return instead of triggering InternalError().
Peter Johnson [Mon, 29 Oct 2001 06:28:51 +0000 (06:28 -0000)]
On xfree(NULL), just return instead of triggering InternalError().

svn path=/trunk/yasm/; revision=302

23 years agoPlug memory leaks, and enhance finding later ones with *_delete functions.
Peter Johnson [Mon, 29 Oct 2001 04:52:44 +0000 (04:52 -0000)]
Plug memory leaks, and enhance finding later ones with *_delete functions.
Fix a *major* bug in expr_level_op().

svn path=/trunk/yasm/; revision=301

23 years agoGet rid of all the extra filename strdup()'s. (Bug #14).
Peter Johnson [Mon, 29 Oct 2001 01:10:20 +0000 (01:10 -0000)]
Get rid of all the extra filename strdup()'s.  (Bug #14).

svn path=/trunk/yasm/; revision=300

23 years agoMake InternalError() a bit easier to call. Also, reverse its file and line
Peter Johnson [Mon, 29 Oct 2001 00:21:00 +0000 (00:21 -0000)]
Make InternalError() a bit easier to call.  Also, reverse its file and line
parameters to match the *At() functions.

svn path=/trunk/yasm/; revision=299

23 years agoAdd xfree() to replace calls to free().
Peter Johnson [Mon, 29 Oct 2001 00:11:14 +0000 (00:11 -0000)]
Add xfree() to replace calls to free().
This also fixes the build breakage caused by removing stdlib includes.

svn path=/trunk/yasm/; revision=298

23 years agoAdd option for malloc debugging using dmalloc library (http://dmalloc.com/).
Peter Johnson [Mon, 29 Oct 2001 00:01:31 +0000 (00:01 -0000)]
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

23 years agoPut in temporary implementations of ErrorAt() and WarningAt().
Peter Johnson [Sun, 28 Oct 2001 23:58:39 +0000 (23:58 -0000)]
Put in temporary implementations of ErrorAt() and WarningAt().

svn path=/trunk/yasm/; revision=296

23 years agoParse NOSPLIT.
Peter Johnson [Sun, 28 Oct 2001 23:39:14 +0000 (23:39 -0000)]
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

23 years ago*COMPLETELY* rewrite most of expression handling.
Peter Johnson [Sun, 28 Oct 2001 09:22:13 +0000 (09:22 -0000)]
*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

23 years agoAdd other Makefiles, supporting files to EXTRA_DIST.
Peter Johnson [Sun, 28 Oct 2001 09:16:11 +0000 (09:16 -0000)]
Add other Makefiles, supporting files to EXTRA_DIST.

svn path=/trunk/yasm/; revision=293

23 years agoAdd mergesort() replacement from BSD sources.
Peter Johnson [Fri, 26 Oct 2001 04:32:18 +0000 (04:32 -0000)]
Add mergesort() replacement from BSD sources.

svn path=/trunk/yasm/; revision=292

23 years agoRCSID() breaks under DJGPP because of "__unused". Removing __unused shouldn't
Peter Johnson [Sun, 21 Oct 2001 00:13:24 +0000 (00:13 -0000)]
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

23 years agoAdd "very flat" (based on Makefile.flat) makefiles and config.h files for
Peter Johnson [Sat, 20 Oct 2001 23:37:13 +0000 (23:37 -0000)]
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

23 years agoPrototype, very simple, flat Makefile for use in compiling (but NOT developing)
Peter Johnson [Sat, 20 Oct 2001 21:40:02 +0000 (21:40 -0000)]
Prototype, very simple, flat Makefile for use in compiling (but NOT developing)
on other platforms.

svn path=/trunk/yasm/; revision=289

23 years agoUpdate comment on disp.len to match changes in expr.c.
Peter Johnson [Thu, 18 Oct 2001 07:02:11 +0000 (07:02 -0000)]
Update comment on disp.len to match changes in expr.c.

svn path=/trunk/yasm/; revision=288

23 years agoAdd parser finalization check for undefined symbols.
Peter Johnson [Mon, 15 Oct 2001 07:25:47 +0000 (07:25 -0000)]
Add parser finalization check for undefined symbols.

svn path=/trunk/yasm/; revision=287

23 years agoAdd symrec_get_visibility().
Peter Johnson [Mon, 15 Oct 2001 07:13:16 +0000 (07:13 -0000)]
Add symrec_get_visibility().

svn path=/trunk/yasm/; revision=286

23 years agoCall expr_expand_equ() on effective address from bytecode_parser_finalize().
Peter Johnson [Mon, 15 Oct 2001 07:07:55 +0000 (07:07 -0000)]
Call expr_expand_equ() on effective address from bytecode_parser_finalize().

svn path=/trunk/yasm/; revision=285

23 years agoAdd _copy() constructor.
Peter Johnson [Mon, 15 Oct 2001 07:04:01 +0000 (07:04 -0000)]
Add _copy() constructor.
Add expr_expand_equ().

svn path=/trunk/yasm/; revision=284

23 years agoAdd first version of post-parsing bytecode finalization. Lots of work still
Peter Johnson [Mon, 15 Oct 2001 04:42:47 +0000 (04:42 -0000)]
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

23 years agoAdd several major functions, including effective address ModRM calculation
Peter Johnson [Mon, 15 Oct 2001 04:40:45 +0000 (04:40 -0000)]
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

23 years agoChange order of arguments for get_ and check_ functions to better match other
Peter Johnson [Mon, 15 Oct 2001 04:34:11 +0000 (04:34 -0000)]
Change order of arguments for get_ and check_ functions to better match other
functions (floatnum * as first arg).

svn path=/trunk/yasm/; revision=281

23 years agoAllow both signed and unsigned interpretations for get_int and check_size.
Peter Johnson [Mon, 15 Oct 2001 04:32:16 +0000 (04:32 -0000)]
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

23 years agoAdd parsing of memory expressions. Currently adds a lot of duplication for
Peter Johnson [Fri, 12 Oct 2001 03:36:10 +0000 (03:36 -0000)]
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

23 years agoAdd expr_contains_float() and symrec_get_equ() functions. These are the first
Peter Johnson [Fri, 12 Oct 2001 02:34:30 +0000 (02:34 -0000)]
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

23 years agoClarify and fix some usages of valid/need flags for modrm and sib bytes.
Peter Johnson [Fri, 12 Oct 2001 02:29:31 +0000 (02:29 -0000)]
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

23 years agoDon't allow floats to be used as targets of jumps.
Peter Johnson [Thu, 11 Oct 2001 23:09:34 +0000 (23:09 -0000)]
Don't allow floats to be used as targets of jumps.

svn path=/trunk/yasm/; revision=276

23 years agoSupport TIMES prefix. Split expr parsing to have a no-float and no-string
Peter Johnson [Thu, 11 Oct 2001 22:55:04 +0000 (22:55 -0000)]
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

23 years agoFix conficts created when adding EQU.
Peter Johnson [Thu, 11 Oct 2001 19:15:45 +0000 (19:15 -0000)]
Fix conficts created when adding EQU.

svn path=/trunk/yasm/; revision=274

23 years agoFix handling of numeric constants ending in a single character (h,q,b).
Peter Johnson [Thu, 11 Oct 2001 18:59:13 +0000 (18:59 -0000)]
Fix handling of numeric constants ending in a single character (h,q,b).

svn path=/trunk/yasm/; revision=273

23 years agoHandle EQU. Handle BITS directive. Move directive handling out to separate
Peter Johnson [Thu, 11 Oct 2001 17:33:30 +0000 (17:33 -0000)]
Handle EQU.  Handle BITS directive.  Move directive handling out to separate
function.

svn path=/trunk/yasm/; revision=272

23 years agoRemove NULL return checks; BitVector uses xmalloc(), so they aren't necessary.
Peter Johnson [Thu, 11 Oct 2001 05:37:34 +0000 (05:37 -0000)]
Remove NULL return checks; BitVector uses xmalloc(), so they aren't necessary.

svn path=/trunk/yasm/; revision=271

23 years agoFix LOTS of little nits. Primary changes:
Peter Johnson [Thu, 11 Oct 2001 05:34:50 +0000 (05:34 -0000)]
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

23 years agoOutput "real" version and package names (from config.h).
Peter Johnson [Thu, 11 Oct 2001 00:14:25 +0000 (00:14 -0000)]
Output "real" version and package names (from config.h).

svn path=/trunk/yasm/; revision=269

23 years agoAdd BitVector_from_Oct() and tests for it.
Peter Johnson [Sun, 7 Oct 2001 23:02:43 +0000 (23:02 -0000)]
Add BitVector_from_Oct() and tests for it.

svn path=/trunk/yasm/; revision=268