summaryrefslogtreecommitdiff
path: root/modules
Commit message (Collapse)AuthorAgeFilesLines
* Fix #201: explicitly ignore [warning] directive and treat as warning.Peter Johnson2010-05-165-0/+21
| | | | svn path=/trunk/yasm/; revision=2323
* Support all unary operators in directive expressions.Peter Johnson2010-05-161-45/+22
| | | | svn path=/trunk/yasm/; revision=2322
* Fix #202 (incorrect GOT offset generated in NASM mode).Peter Johnson2010-05-152-13/+2
| | | | | | | | | | | | | Don't generate an additional offset for _GLOBAL_OFFSET_TABLE_ if a WRT was specified (the NASM usage). In GAS, _GLOBAL_OFFSET_TABLE_ doesn't have a WRT but instead has special handling. This isn't quite *exactly* the right fix; a better fix would be to recognize the _GLOBAL_OFFSET_TABLE_ case in the GAS parser and adjust the value appropriately there. However, this fix seems to do the right thing in the meantime for both GAS and NASM cases. svn path=/trunk/yasm/; revision=2321
* NASM preproc: Add basic support for %{x:y} parameter list expansion.Peter Johnson2010-04-081-79/+128
| | | | | | | | | Contributed by: Mathieu Monnier nasm64developer has a more advanced 3-parameter version that will take some time to integrate, so for now just provide the simpler version. svn path=/trunk/yasm/; revision=2312
* NASM preprocessor: Add %scope and %endscope.Peter Johnson2010-04-084-11/+107
| | | | | | Contributed by: Mathieu Monnier svn path=/trunk/yasm/; revision=2311
* Instead of initializing unknown sections en-masse during objfmt_output(),Peter Johnson2010-03-289-185/+126
| | | | | | | | | | | add new objfmt interface function init_new_section() to initialize as we go. This fixes several issues, primarily with debug formats that create sections. Reported by: Brian Gladman svn path=/trunk/yasm/; revision=2310
* Update yasm_parsers(7) now that GAS preprocessor support is fairly mature.Peter Johnson2010-02-131-5/+5
| | | | svn path=/trunk/yasm/; revision=2286
* Add support for gas preprocessor macro directives.Peter Johnson2010-02-134-0/+241
| | | | | | | | | 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
* nasm_pp_cleanup(): Do a better job of cleaning up.Peter Johnson2010-02-061-0/+6
| | | | svn path=/trunk/yasm/; revision=2283
* Add .intel_syntax and .gas_syntax support to GAS parser.Peter Johnson2010-01-1914-11/+256
| | | | | | | | Uses the NASM parser for the .intel_syntax parsing heavy lifting. Contributed by: Alexei Svitkine svn path=/trunk/yasm/; revision=2279
* Add nasm-parser-struct.h to SOURCES.Peter Johnson2010-01-191-0/+1
| | | | svn path=/trunk/yasm/; revision=2278
* Nasm parser: Add some very basic MASM-ish syntax handling, along the linesPeter Johnson2010-01-195-4/+80
| | | | | | | | | | | 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
* Split yasm_parser_nasm structure out to separate header.Peter Johnson2010-01-192-61/+96
| | | | | | | | | 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
* Allow gas flags input to bin objfmt (ignored and not used).Peter Johnson2010-01-141-1/+11
| | | | | | Contributed by: Alexei Svitkine svn path=/trunk/yasm/; revision=2275
* substitute_values(): Allocate sufficient space for null terminator.Peter Johnson2010-01-141-1/+1
| | | | | | Noticed by: Alexei Svitkine svn path=/trunk/yasm/; revision=2274
* gas-preproc.c: Use sprintf instead of snprintf.Peter Johnson2010-01-131-1/+1
| | | | | | | | It's impossible for a decimal long string to be longer than 64 chars. Also remove workaround for MSVC added in r2267. svn path=/trunk/yasm/; revision=2273
* Update autoconf/automake scripts.Peter Johnson2010-01-074-4/+4
| | | | | | | | Also remove ltmain.sh as we no longer use libtool. Patch submitted by: Roumen Petrov <bugtrack@roumenpetrov.info> svn path=/trunk/yasm/; revision=2269
* Unbreak make distcheck.Peter Johnson2010-01-072-1/+2
| | | | svn path=/trunk/yasm/; revision=2268
* Now that the gas preproc supports .rept, remove it from the gas parser.Peter Johnson2010-01-034-269/+1
| | | | svn path=/trunk/yasm/; revision=2266
* GAS preproc: Fix line number for .rept without matching .endr error.Peter Johnson2010-01-033-2/+7
| | | | | | | | 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
* bin-objfmt.c: Comment out unused function (kept in the code for debugging).Peter Johnson2010-01-031-0/+3
| | | | svn path=/trunk/yasm/; revision=2263
* gas-preproc.c: Avoid warning on unused variable.Peter Johnson2010-01-031-1/+0
| | | | svn path=/trunk/yasm/; revision=2261
* Improve the gas preprocessor and re-add it as default for gas parser.Peter Johnson2010-01-036-42/+141
| | | | | | | | | | | | | | 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
* Implement some linemap changes required for the GAS preprocessor.Peter Johnson2010-01-032-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Use queue.h HEAD macros more portably (also avoiding compiler warning).Peter Johnson2010-01-033-4/+4
| | | | svn path=/trunk/yasm/; revision=2258
* Fix additional cases of duplicate 66h prefix generation for AVX instructions.Peter Johnson2010-01-024-14/+81
| | | | | | Reported by: Gil Dabah svn path=/trunk/yasm/; revision=2257
* Avoid generating duplicate 66h prefix on PINSRB in 16-bit mode.Peter Johnson2009-12-294-2/+26
| | | | | | Reported by: Gil Dabah <arkon@ragestorm.net> svn path=/trunk/yasm/; revision=2251
* Revert gas parser default to raw preproc until gas tests pass with the gasPeter Johnson2009-12-281-2/+2
| | | | | | preproc. svn path=/trunk/yasm/; revision=2250
* Fix incorrect vaesimc encoding (need to set VEX.vvvv=1111).Peter Johnson2009-12-282-4/+4
| | | | | | Reported by: Gil Dabah <arkon@ragestorm.net> svn path=/trunk/yasm/; revision=2249
* gas-preproc.c: Avoid casting away of const.Peter Johnson2009-12-261-2/+2
| | | | svn path=/trunk/yasm/; revision=2247
* Update gas preproc a bit:Peter Johnson2009-12-261-14/+41
| | | | | | | | | - 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
* nasm-pp.c: Use vsnprintf if available.Peter Johnson2009-12-261-2/+6
| | | | | | Patch contributed by: Alexei Svitkine <alexei.svitkine@gmail.com> svn path=/trunk/yasm/; revision=2245
* Default to gas preproc for gas parser.Peter Johnson2009-12-261-1/+1
| | | | svn path=/trunk/yasm/; revision=2244
* Add initial gas preprocessor, contributed by Alexei Svitkine.Peter Johnson2009-12-239-1/+1510
| | | | | | | | | | 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
* Unbreak gen_x86_insn.py on Python 2.4.Peter Johnson2009-12-061-1/+4
| | | | | | Patch by: Alexei Svitkine <alexei.svitkine@gmail.com> svn path=/trunk/yasm/; revision=2242
* Update gen_x86_insn.py to work in both Python 2 and 3Brian Gladman2009-12-051-25/+33
| | | | svn path=/trunk/yasm/; revision=2240
* Fix #198: Previous commit accidentally broke a great many instructions.Peter Johnson2009-12-014-16/+373
| | | | svn path=/trunk/yasm/; revision=2239
* Fix a bunch of GAS x86 instruction issues.Peter Johnson2009-11-3010-50/+1597
| | | | | | | | | | - 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
* Fix #191: Incorrect argument order generated for AMD FMA4 opcodes.Peter Johnson2009-11-082-191/+191
| | | | svn path=/trunk/yasm/; revision=2237
* Fix #190: Incorrect opcode generated for vphaddudq.Peter Johnson2009-11-082-4/+4
| | | | svn path=/trunk/yasm/; revision=2236
* Fix #78 further: Support C++ style // comments.Peter Johnson2009-09-123-1/+4
| | | | svn path=/trunk/yasm/; revision=2232
* Fix #184: test -e is not portable (despite being in POSIX); use test -f instead.Peter Johnson2009-07-302-2/+2
| | | | svn path=/trunk/yasm/; revision=2226
* Unbreak distcheck.Peter Johnson2009-07-251-4/+4
| | | | svn path=/trunk/yasm/; revision=2224
* Update elf special symbols:Peter Johnson2009-07-222-2/+13
| | | | | | | - Add tlsdesc and tlscall to both x86 and amd64. - Add 64-bit pltoff, gotplt, gotoff to amd64. svn path=/trunk/yasm/; revision=2210
* Unbreak make check (broken by [2206]).Peter Johnson2009-07-221-1/+1
| | | | svn path=/trunk/yasm/; revision=2209
* elf: Add latest x86 relocation types.Peter Johnson2009-07-221-1/+4
| | | | svn path=/trunk/yasm/; revision=2208
* elf: Add support for 64-bit PC-relative relocation.Peter Johnson2009-07-211-0/+1
| | | | svn path=/trunk/yasm/; revision=2207
* Special-case _GLOBAL_OFFSET_TABLE_ in elf32/64 to generate appropriate relocs.Peter Johnson2009-07-219-73/+684
| | | | | | | | | | | | | 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
* Fix #177: Make check fails on CR/LF systems.Peter Johnson2009-07-181-1/+1
| | | | | | The diff on the hexdump output was not using -w. svn path=/trunk/yasm/; revision=2204
* Fix #175: Only sanity check final section size if no user errors occurred.Peter Johnson2009-06-121-1/+2
| | | | svn path=/trunk/yasm/; revision=2203