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
While the F2/F3/66 prefix used by these instructions should precede the
REX prefix in 64-bit mode, they should probably not precede the segment
override. The processor specifications seem to be unclear on this point,
so play it safe.
This change has a minor side-effect of reversing the segreg/size override
ordering on things like "fs cmpsd" in 16-bit mode; this is okay as those
prefixes can be in any order. This is due to the way Yasm implements
segreg overrides for instructions with no EA.
Reported by: Danny Reeves <danny_reeves@hotmail.com>
svn path=/trunk/yasm/; revision=1666
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
an error if no files are specified (instead of defaulting to stdin).
While the old behavior mimiced GNU AS, the new behavior is far more common
amongst typical compilers (e.g. GCC), including NASM.
While I'm here, add support for '--' (e.g. "yasm -- -f").
svn path=/trunk/yasm/; revision=1659
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
setting in the file and use it against the entire file (oops).
(first half of #83)
Also make the error message a lot nicer, at least for ones we detect early
(shl ax, 2 in 8086 mode still gives the old message).
While I'm here, upgrade movsd to CPU_386.
svn path=/trunk/yasm/; revision=1654
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
16-bit operations don't clear the high bits of the 64-bit register, so
this is effectively a NOP as well.
While I'm still looking at this, make "xchg rax, rax" not output a REX
prefix.
I thought about being extra-clever and have "xchg ax, ax" not output an
operand-size prefix, but thought better of it: if the user says "ax"
they're probably going to expect the prefix to be there. Left in as
a comment for future readers of the code.
svn path=/trunk/yasm/; revision=1639
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
Also remove float (gdtoa and softfloat) directory, as no one is asking for
floating point calculation, we've never integrated any of this code, and
it's just taking up space (note it's still available on a branch).
svn path=/trunk/yasm/; revision=1622