| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
svn path=/trunk/yasm/; revision=2323
|
|
|
|
| |
svn path=/trunk/yasm/; revision=2322
|
|
|
|
| |
svn path=/trunk/yasm/; revision=2286
|
|
|
|
|
|
|
|
|
| |
It doesn't yet support the full set of macro types gas supports, but
can handle a lot of common cases.
Contributed by: Alexei Svitkine
svn path=/trunk/yasm/; revision=2285
|
|
|
|
|
|
|
|
| |
Uses the NASM parser for the .intel_syntax parsing heavy lifting.
Contributed by: Alexei Svitkine
svn path=/trunk/yasm/; revision=2279
|
|
|
|
| |
svn path=/trunk/yasm/; revision=2278
|
|
|
|
|
|
|
|
|
|
|
| |
of the TASM "mode".
These code paths aren't used yet; they will be used for GAS .intel_syntax
handling.
Contributed by: Alexei Svitkine
svn path=/trunk/yasm/; revision=2277
|
|
|
|
|
|
|
|
|
| |
This is needed so that other parsers can get access to this structure without
naming conflicts.
Contributed by: Alexei Svitkine
svn path=/trunk/yasm/; revision=2276
|
|
|
|
|
|
|
|
| |
Also remove ltmain.sh as we no longer use libtool.
Patch submitted by: Roumen Petrov <bugtrack@roumenpetrov.info>
svn path=/trunk/yasm/; revision=2269
|
|
|
|
| |
svn path=/trunk/yasm/; revision=2266
|
|
|
|
|
|
|
|
| |
The line number reported for the error is that of the .rept directive.
Contributed by: Alexei Svitkine <alexei.svitkine@gmail.com>
svn path=/trunk/yasm/; revision=2265
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Contributed by: Alexei Svitkine <alexei.svitkine@gmail.com>
Summary of changes:
- Correct line numbers will now be reported for warnings and errors
when using the GAS preprocessor
- GAS preprocessor will now replace defined (e.g. via .set) variables
by their values in lines returned to the parser
- GAS preprocessor will now handle multi-line comments correctly
- GAS preprocessor will now handle nested .rept directives correctly
svn path=/trunk/yasm/; revision=2260
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Contributed by: Alexei Svitkine <alexei.svitkine@gmail.com>
- yasm_linemap_set() now takes virtual_line as a parameter, instead of
always using linemap->current. If 0 is passed for the virtual_line,
then linemap->current is used, as before.
This is because linemap->current was only incremented by the parser
(and never decremented), so the preprocessor was not able to set
mappings during the preprocessing phase (whereas with these changes,
it now does).
Additionally, setting a mapping for a line number will now delete any
existing mappings for line numbers equal or greater to that line
number. This allows the code to correctly handle the case when the
preprocessor first sets mappings from pre-pp lines to post-pp lines,
and later those mappings getting superseded by .line directives in the
original source.
This change also required making a change to yasm_linemap_lookup() to
set *file_line to 0 when line is 0 (i.e. preventing line 0 - which
means "don't display line number in output" - from getting mapped).
svn path=/trunk/yasm/; revision=2259
|
|
|
|
|
|
| |
preproc.
svn path=/trunk/yasm/; revision=2250
|
|
|
|
| |
svn path=/trunk/yasm/; revision=2244
|
|
|
|
|
|
|
|
|
|
| |
Support for include directive amongst other major key pieces.
Does not currently support macros.
Fixes #79.
Contributed by: Alexei Svitkine <alexei.svitkine@gmail.com>
svn path=/trunk/yasm/; revision=2243
|
|
|
|
| |
svn path=/trunk/yasm/; revision=2232
|
|
|
|
|
|
| |
Requested by: Rugxulo <rugxulo@gmail.com>
svn path=/trunk/yasm/; revision=2196
|
|
|
|
|
|
| |
Reported by: Brian Gladman
svn path=/trunk/yasm/; revision=2190
|
|
|
|
| |
svn path=/trunk/yasm/; revision=2169
|
|
|
|
| |
svn path=/trunk/yasm/; revision=2168
|
|
|
|
| |
svn path=/trunk/yasm/; revision=2167
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In ELF, @ is used to indicate special relocations.
Fixes #164.
Reported by: Gregory McGarry on yasm-devel@
Testcase by: Gregory McGarry
We don't allow identifiers to start with @; doing so conflicts with use of
e.g. "@function" in some directives. Need to look into what GAS does.
svn path=/trunk/yasm/; revision=2166
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use the single token of lookahead to detect the label case.
This is significantly cleaner as it removes the special-casing of labels
in the tokenizer (so there is just a single identifier rule) and removes
the INSTDIR parser state (as this was only used to prevent instruction
lookup within other locations).
Also, ID and LABEL now provide the string length to the parser. We needed
to do this for ID due to parse_check_insnprefix() needing the length, so
both were folded in for consistency.
svn path=/trunk/yasm/; revision=2164
|
|
|
|
| |
svn path=/trunk/yasm/; revision=2163
|
|
|
|
|
|
| |
While this is not mentioned in the GAS documentation, GAS doesn't require it.
svn path=/trunk/yasm/; revision=2158
|
|
|
|
| |
svn path=/trunk/yasm/; revision=2140
|
|
|
|
|
|
|
|
|
|
|
| |
platform to have them.
Also, instead of using snprintf, preallocate and then use sprintf. This
also avoids the while() reallocation loop.
Reported by: Brian Gladman
svn path=/trunk/yasm/; revision=2139
|
|
|
|
|
|
| |
Fix a few warnings while here.
svn path=/trunk/yasm/; revision=2134
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Contributed by: Samuel Thibault <samuel.thibault@ens-lyon.org>
It is built on top of the NASM parser and preproc, with the following
notable extensions for TASM syntax:
- case insensitive symbols and filenames,
- support for segment and size of labels, which permits to avoid giving
them on each memory dereference,
- support for data reservation (i.e. e.g. "var dd ?"),
- support for multiples (i.e. e.g. "var dd 1 dup 10"),
- little endian string integer constants,
- additional expression operators: shl, shr, and, or, low, high,
- additional offset keyword,
- additional fword and df,
- support for doubled quotes within quotes,
- support for array-like and structure-like notations: t[eax] and
[var].field,
- support for tasm directives: macro, rept, irp, locals, proc, struc,
segment, assume.
Notes:
- Almost all extensions are only effective when tasm_compatible_mode is
set, so we should have very reduced possible breakage.
- Because the "and" keyword can be an expression operator and an
instruction name, the data pseudo-instructions explicitly switch the
lexer state to INSTRUCTION state to fix the ambiguity.
- In gen_x86_insn.py, several instructions (namely lds and lea) now take
relaxed memory sizes. The reason is that in the case of tasm, the size
of the actual pointed data is passed up to there, and thus any type of
data should be accepted.
With all of this, loadlin can be compiled by yasm with quite reduced
modifications.
A new TASM-like frontend is also included.
svn path=/trunk/yasm/; revision=2130
|
|
|
|
|
|
|
|
|
|
| |
This was because the re2c-generated code always reads the next character
prior to user code being executed. Instead, check for the \0 marker prior
to entering the re2c code. Retain the re2c check just for sanity.
Reported by: Samuel Thibault (on yasm-devel@)
svn path=/trunk/yasm/; revision=2122
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Not default nor even distributed in the .tar.gz, the cmake build allows for
loadable yasm plugins by building libyasm as a shared library.
Example plugins are in the plugins/ directory, and may be loaded into a
cmake-built yasm using the -N command line option (non-cmake builds will
not have this option).
Tested only on Linux so far, but should be relatively painless to port to
Windows thanks to the use of cmake rather than libtool to create shared
libraries.
The only modification to the main source tree is some conditional-compiled
additions to yasm.c.
svn path=/trunk/yasm/; revision=2098
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Standard macro sets are looked up based on parser and preprocessor keyword
from individual modules.
The "standard" NASM parser macros now reside in the NASM parser, so when
the GAS parser is used with the NASM preprocessor, the NASM-specific macros
are no longer defined.
Object-format specific macros are now individually defined by each object
formatm module. This allows for the object formats to be independent of the
NASM preprocessor module and yields a small optimization benefit as unused
object format macros don't need to be skipped over.
Also add GAS macro equivalents for the Win64 SEH more complex directives [1].
[1] Requested by Brian Gladman <brg@gladman.plus.com>
svn path=/trunk/yasm/; revision=2082
|
|
|
|
|
|
| |
This is required for the win64 SEH directives.
svn path=/trunk/yasm/; revision=2081
|
|
|
|
|
|
| |
Reported by: Brian Gladman
svn path=/trunk/yasm/; revision=2078
|
|
|
|
|
|
|
|
| |
Note: this combination is obviously not supported by any other assembler.
Requested by: Brian Gladman <brg@gladman.plus.com>
svn path=/trunk/yasm/; revision=2076
|
|
|
|
|
|
|
| |
This makes things like 00_11_22_33h okay.
Allow 0X as well as 0x in directives (already allowed for normal case).
svn path=/trunk/yasm/; revision=2063
|
|
|
|
|
|
|
|
|
|
|
|
| |
A full testcase for NASM mode based on the AVX programming reference is
included. GAS mode should work, but is untested at present.
V-prefix aliases are present for all supported instructions to allow easy
use of the VEX prefix version without significant code modifications.
All comparison and other pseudo-ops are included.
svn path=/trunk/yasm/; revision=2051
|
|
|
|
|
|
|
|
| |
Add testcase for this.
Also fix $-prefixed labels to match non-$-prefixed label behavior
(this has been broken for a very long time).
svn path=/trunk/yasm/; revision=2045
|
|
|
|
| |
svn path=/trunk/yasm/; revision=2038
|
|
|
|
|
|
|
|
|
|
| |
To do this, restructure how special symbols are handled between the parser
and object format. Instead of creating special symbols with the right
names, instead have the parser call the object format to see if a match
is found into the special symbols, which are no longer stored in the
symbol table.
svn path=/trunk/yasm/; revision=2035
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Formerly:
foo equ 1:2
jmp foo
would result in a far jump. Now, an explicit "far" is required:
jmp far foo
to generate a far jump.
In addition, the direct use of seg:off in immediates and effective
addresses will result in an error; the use of EQU'ed seg:off values
is still legal (and will still result in just the offset). This
behavior is more sane and also matches NASM behavior.
Thus:
foo equ 1:2
mov ax, foo ; okay, just 2
mov ax, [foo] ; okay, just 2
mov ax, 1:2 ; illegal
mov ax, [1:2] ; illegal
svn path=/trunk/yasm/; revision=2028
|
|
|
|
| |
svn path=/trunk/yasm/; revision=2023
|
|
|
|
|
|
| |
Implementation copied from gas parser.
svn path=/trunk/yasm/; revision=2021
|
|
|
|
|
|
|
|
|
|
| |
Now instead of the generic "expression syntax error", more informative
error messages such as the following are reported:
- unexpected `:' after instruction
- expected expression after `%'
- expected operand, got `%'
svn path=/trunk/yasm/; revision=2020
|
|
|
|
|
|
| |
of error messages.
svn path=/trunk/yasm/; revision=2019
|
|
|
|
| |
svn path=/trunk/yasm/; revision=2017
|
|
|
|
|
|
|
|
|
|
| |
This will make certain types of parser-preprocessor synchronization
easier for upcoming feature enhancements.
Due to additional complexity in GAS (rept), internally GAS converts
lines back into blocks.
svn path=/trunk/yasm/; revision=2007
|
|
|
|
| |
svn path=/trunk/yasm/; revision=2006
|
|
|
|
|
|
|
| |
not all segment registers. FS and GS are the only ones which can have
a segment base != 0.
svn path=/trunk/yasm/; revision=1971
|