sym-sym terms. Starting to get some code duplication that should get
refactored somehow, but the first priority is getting it working.
svn path=/branches/new-optimizer/; revision=1575
correct detection of absolute section reference loops (fixing a crash case).
This is also needed for an ongoing rewrite of reloc/value handling.
* expr.c (expr_xform_bc_dist): Remove transformation of absolute section
references; move in changed form into...
(yasm_expr__level_tree): Here. The new code doesn't immediately calculate
the distance from the start of the absolute section to the referenced symbol;
rather it generates an expression for this quantity. As this actually adds
new absolute section refs to the tree, we can't expand with YASM_EXPR_SYMs,
otherwise we would expand multiple times. Thus we need a new
YASM_EXPR_SYMEXP type that thus does not get expanded. Unfortunately this
ripples changes a bit because everywhere *else* we look for YASM_EXPR_SYM,
we now need to look for YASM_EXPR_SYMEXP as well...
(expr_xform_bc_dist): Here.
(yasm_expr__copy_except): Here.
(yasm_expr_extract_symrec): Here.
(yasm_expr_get_symrec): Here.
(yasm_expr_print): Here.
* bin-objfmt.c (bin_objfmt_expr_xform): And here.
* expr-int.h (yasm_expr__type): Define new YASM_EXPR_SYMEXP.
* section.h (yasm_section_abs_get_sym): To implement above, we need to get
a symbol referencing the first bytecode in the absolute section. To avoid
creating redundant symrecs, one is generated for us now. This function
lets us get it in yasm_expr__level_tree().
* section.c (yasm_section_abs_get_sym): Implement.
(yasm_section): Add necessary SECTION_ABSOLUTE data.
(yasm_section_create_absolute): Create the symrec here.
* absloop-err.asm: New test for absolute section reference loops.
svn path=/trunk/yasm/; revision=1417
expr_level_tree(). This fixes negative equ's and probably other issues.
This also makes expr_simplify() a macro pointing to expr_level_tree().
svn path=/trunk/yasm/; revision=778
/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.
svn path=/trunk/yasm/; revision=718
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
svn path=/trunk/yasm/; revision=670
"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
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