Peter Johnson [Tue, 1 Oct 2002 18:56:28 +0000 (18:56 -0000)]
Completely revamp how label resolution is done (part of Bug#6). Now calculates
/distances/ between bytecodes in a section using bc_calc_dist() functions (a
"typical" one is provided for most occasions). expr_expand_labelequ() is gone,
as its functionality is integrated into expr_simplify(). Currently these
changes break most bin objfmt output, as it doesn't know how to resolve
absolute labels yet. Also, very preliminary expr support for :, SEG, and WRT
operators has been added (part of Bug#2). Several other minor bug fixes.
Peter Johnson [Tue, 24 Sep 2002 18:35:51 +0000 (18:35 -0000)]
Rename intnum_new_int to intnum_new_uint, and add new signed version of
intnum_new_int. Currently only just calls intnum_new_uint with a cast, but
eventually there may be a better way of handling signed numbers.
Peter Johnson [Mon, 23 Sep 2002 06:16:59 +0000 (06:16 -0000)]
Move yasm core files into a libyasm shared library (avoiding backlinking).
Some cleanups still needed; a few things in globals should really be somewhere
else, or named differently.
Peter Johnson [Sun, 18 Aug 2002 03:48:17 +0000 (03:48 -0000)]
Eliminate duplicate code for callbacks from expr_expand_labelequ() by moving
code and adding a resolve_precall function parameter (which caused cascading
changes in bytecode-related sources).
Peter Johnson [Tue, 13 Aug 2002 05:56:39 +0000 (05:56 -0000)]
Finish remaining instructions (SSE, SSE2, Cyrix MMX). Changed CPU flags for
MMX/SSE2 to reflect that it's the MMX or SSE2 cpu feature, not the cpu family.
Peter Johnson [Sat, 10 Aug 2002 23:04:28 +0000 (23:04 -0000)]
Add checking of target modifier.
Change operand typing mask constants to be more uniform.
Increase operand type size to long from int, as it now can go over 16 bits.
Peter Johnson [Sat, 10 Aug 2002 18:18:59 +0000 (18:18 -0000)]
Added shift instructions, as well as new "postponed" actions for things such
as shift ,1 operands and imm operands that have sign-extended imm8 forms that
can't be decided at parse-time. The x86 bc format already had support for
these. Also fixed a bug in the lfs family (incorrect inst len).
Peter Johnson [Fri, 9 Aug 2002 05:43:03 +0000 (05:43 -0000)]
Massive restructuring of lexing and parsing (NASM-compatible parser).
Bugzilla Bug#3. Not all instructions are parsed yet, so this is actually a
minor feature regression from the user side, but this commit lays the framework
for much easier additions of new assembler syntaxes and architectures. The
re2c tool is now used to generate the lexers, as it's much more flexibly
function-oriented than lex.
- nasm-bison.y is a repocopy+modify of nasm/bison.y.in.
- x86arch.h now includes all of x86-int.h
Peter Johnson [Fri, 9 Aug 2002 05:22:07 +0000 (05:22 -0000)]
Flatten the tools/re2c build.
- Moved (by repocopy) main.c to re2c.c
- Moved (by repocopy) parser.y to re2c-parser.y
- Changed to Makefile.inc's rather than Makefile.am's
- Modified all the source file local includes to point to tools/re2c/*.h
Peter Johnson [Sat, 3 Aug 2002 03:40:51 +0000 (03:40 -0000)]
Remove .re.c suffix rule. In GNU make, this doesn't work as intended (instead
of making all .re -> .c builds require re2c (as a suffix rule), it instead sees
it as a rule to build ".re.c"). Oddly enough, in BSD make this works perfectly.
Peter Johnson [Mon, 24 Jun 2002 07:30:28 +0000 (07:30 -0000)]
Add configure.lineno to CLEANFILES. It doesn't delete itself or have something
else delete it, making distcheck impossible (the build directory isn't empty
after a distclean).
Peter Johnson [Thu, 23 May 2002 07:24:41 +0000 (07:24 -0000)]
Bytecode and objfmt changes:
- Add two new bytecode types:
BC_ALIGN (not yet implemented) for performing nice alignment magic.
BC_OBJFMT_DATA for storing objfmt-generated data in more advanced objfmts.
- objfmt structure changes:
Add handling functions for BC_OBJFMT_DATA data.
Allow a number of functions to be NULL.
Peter Johnson [Sat, 11 May 2002 01:50:11 +0000 (01:50 -0000)]
During the first pass of basic optimization, continue reporting errors, don't
stop at the first error.
To help prevent spurios errors, make bytecodes with errors 0 length in
bc_resolve().
Peter Johnson [Sun, 5 May 2002 18:18:07 +0000 (18:18 -0000)]
Change handling of res* (no longer require that the entire containing buffer
be allocated and filled with 0's to write it out).
Other fixes:
Specifically look for floating point values in res* and multiple exprs.
One-byte PC-relative displacement *is* legal (short jumps).
Peter Johnson [Thu, 2 May 2002 06:09:07 +0000 (06:09 -0000)]
A number of fixes to float and integer handling on the output side:
- expr can now negate floatnums
- bin objfmt output_expr now correctly outputs all sizes of integers and
does a check for floating point containing exprs before complaining about
external references. Also checks for properly sized floatnum output with
an ErrorAt instead of an InternalError.