(sym in other section)-(sym in this section) rather than just
(sym in other section)-(curpos) (e.g. sym-$). Unfortunately supporting
this required precbc to be flowed down to the value_finalize functions,
but it's relatively reasonable to do so, as all of the _finalize() routines
have access to precbc.
Reported by: Peter Tanski <peter_tanski@cox.net>
svn path=/trunk/yasm/; revision=1705
Actually, GAS parser doesn't use this yet, as it still contains the rept
functionality that will move to GAS preproc at some point. When GAS
preproc implements rept, we can switch to the common implementation.
svn path=/trunk/yasm/; revision=1668
bug (probably http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28778) by not
accepting NULL for eh, and giving it the static eh at the sole caller of
this function (yasm_expr__level_tree). While I'm here, clean up the logic
a bit to avoid relying on ee.e NULL value. This fix prevents crashes in
GCC 4.1.1 with -fstrict-aliasing (enabled by -O2).
Noticed by: Danny Reeves <danny_reeves@hotmail.com>
svn path=/trunk/yasm/; revision=1665
in the preproc (e.g mm%$x -> mm0) when I implemented a minor optimization
(outputing values in hex to avoid the 2x decimal conversion overhead) in
[1488]. Revert that optimization.
I believe the right way to do this is to add the GAS (and MASM) syntax
sugar of mm(0) etc. to NASM syntax, then any number (not just decimal)
can be used as the new idiom for doing this. But that wouldn't unbreak
programs that already exist, so we're left with this state of affairs.
Sigh.
svn path=/trunk/yasm/; revision=1657
number, rather than the last parsed line number. Also improve
"cannot reference symbol" error a bit, to include the symbol name.
svn path=/trunk/yasm/; revision=1643
rather than simply taking a list of modules on the command line. This allows significant
improvement of the behavior when used with Visual Studio, as the "old" way of doing this
with Visual Studio build files was to scan through the .c files; this brought up things
that were actually disabled in the build.
Also incorporate a patch by Charles Bailey to make the VC8 build less noisy, and allow use
of Win32 Bison if it's installed. Instructions updated as well.
svn path=/trunk/yasm/; revision=1642
recursively in yasm_expr__bc_dist_subst(); before this we would only do
one level, which fails on simple structures like the old NASM align approach
of "($$-$) & value" (as the $$-$ is one level down in the expression).
svn path=/trunk/yasm/; revision=1635
PC-relative relocations (jumps and calls).
- Allow SEG:OFF to be used as just an offset portion (like NASM does).
- Labels in absolute sections that are declared global are given the correct
absolute value in the symbol table.
One difference from NASM:
label equ 0040h:001eh
jmp label
in NASM means the same as:
jmp 001eh (a near jump)
but yasm will treat this the same as:
jmp 0040h:001eh (a far jump)
I'm still not completely happy with this implementation, but it's workable
and fixes all the bugs I've found so far in absolute handling.
svn path=/trunk/yasm/; revision=1634
on QB. We use this flag other places, but forgot to set it here. This
could cause an infinite loop in (rare) situations.
Reported by: Brian Gladman <brg@gladman.plus.com>
(also committed the code he sent that hits this bug as a testcase)
svn path=/trunk/yasm/; revision=1613
displacement length and required optimization would end up with 0
displacement length, causing an internal error).
svn path=/trunk/yasm/; revision=1606
from bytecode.len into bytecode.mult_int. Add new function
yasm_bc_next_offset() to handle the most common use case of bytecode.len,
figuring out the following bytecode's offset.
svn path=/branches/new-optimizer/; revision=1586