- Handle removal of comments during preprocessing
- Fix a bug with evaluation of nested .if/.else statements.
Contributed by: Alexei Svitkine <alexei.svitkine@gmail.com>
svn path=/trunk/yasm/; revision=2246
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
- Fix#193: ljmp/lcall not implemented; add 2-operand far jump to jmp/call.
- Add loop{,z,e} instruction suffixes
- Fix a bunch of jmp/call minor issues.
- Vastly improve suffix handling in general to make more consistent and make
a greater variety of no-suffix instructions work in a way that matches GAS.
svn path=/trunk/yasm/; revision=2238
Due to the need to support cross-building, CC_FOR_BUILD is used instead of
CC for tools that will be run as part of the build process. However, it
is sometimes necessary to add custom CFLAGS for these builds; CFLAGS_FOR_BUILD
supports this cleanly.
svn path=/trunk/yasm/; revision=2234
Check for duplicates in backtrace used when checking for circular references.
This uses a simple N^2 algorithm (as the number of items in the backtrace is
usually small) but avoids memory runaway due to duplicate item storage.
svn path=/trunk/yasm/; revision=2229
This breaks horribly for things like (sym+511)>>9 in -f bin, as the result is
zero instead of something more useful.
Also don't check RHS for symbols; these will fall out later in the assembly
process if they cannot be simplified.
svn path=/trunk/yasm/; revision=2220
This was particularly noticable in GAS, but there was also a bug in NASM
output (lack of fixup within instruction in elf32).
Also:
- changed ssym lookup from a linear search to using assocdata
- added more relocation types (most not implemented)
Reported by: Mark Charney
svn path=/trunk/yasm/; revision=2206
This was because the path returned by yasm__getcwd() did not have a trailing
slash and thus yasm__combpath() stripped off the last path component.
svn path=/trunk/yasm/; revision=2202
AMD has obsoleted the SSE5 spec in favor of these instructions. These
instructions use an AVX-like new opcode structure called XOP instead of
the SSE5 DREX byte.
The AMD FMA4 instructions are a copy of the *old* Intel FMA instructions.
Intel has since updated their spec, and AMD may follow, but for now we've
implemented what AMD's spec contains.
svn path=/trunk/yasm/; revision=2199
- comments stripped before tokenization caused strings containing ';'
to generate warnings (unterminated string) and incorrect output.
- assume directive parsing did not properly handle ';' as end of line
Also add tests for the above.
Reported by: Rugxulo <rugxulo@gmail.com>
svn path=/trunk/yasm/; revision=2197
We were crashing because we didn't generate this error until the preproc
module was getting cleaned up, which doesn't happen until after linemap
is cleaned up. Instead detect and output this error when we reach the end
of preprocessed tokens during the parsing stage.
svn path=/trunk/yasm/; revision=2185
Also match GAS behavior by using different NOP sequences for AMD and Intel.
Different "Long" NOP opcode sequences are used based on the below criteria.
Defaults in 32-bit mode:
- CPU directive not used: backwards compatible (no long NOP opcodes)
- CPU directive with Intel CPU >= 686: Intel guidelines, using long NOPs
- CPU directive with AMD CPU >= K6: AMD guidelines, using long NOPs
Defaults in 64-bit mode:
- CPU directive not used: Intel guidelines, using long NOPs
- CPU directive with Intel CPU >= 686: Intel guidelines, using long NOPs
- CPU directive with AMD CPU >= K6: AMD guidelines, using long NOPs
The above defaults may be overridden with these options to the CPU directive:
- CPU basicnop: backwards compatible (no long NOP opcodes)
- CPU intelnop: Intel guidelines, using long NOPs
- CPU amdnop: AMD guidelines, using long NOPs
Suggested by: Brian Gladman <brg@gladman.plus.com>
svn path=/trunk/yasm/; revision=2181