]> granicus.if.org Git - yasm/log
yasm
14 years agoAllow gas flags input to bin objfmt (ignored and not used).
Peter Johnson [Thu, 14 Jan 2010 08:24:13 +0000 (08:24 -0000)]
Allow gas flags input to bin objfmt (ignored and not used).

Contributed by: Alexei Svitkine

svn path=/trunk/yasm/; revision=2275

14 years agosubstitute_values(): Allocate sufficient space for null terminator.
Peter Johnson [Thu, 14 Jan 2010 08:10:35 +0000 (08:10 -0000)]
substitute_values(): Allocate sufficient space for null terminator.

Noticed by: Alexei Svitkine

svn path=/trunk/yasm/; revision=2274

14 years agogas-preproc.c: Use sprintf instead of snprintf.
Peter Johnson [Wed, 13 Jan 2010 04:44:28 +0000 (04:44 -0000)]
gas-preproc.c: Use sprintf instead of snprintf.

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

14 years agoAllow older automake version (1.9.6).
Peter Johnson [Tue, 12 Jan 2010 05:59:37 +0000 (05:59 -0000)]
Allow older automake version (1.9.6).

svn path=/trunk/yasm/; revision=2272

14 years agoFix #200 - yasm.rules double quote issue
Brian Gladman [Fri, 8 Jan 2010 09:50:52 +0000 (09:50 -0000)]
Fix #200 - yasm.rules double quote issue

svn path=/trunk/yasm/; revision=2271

14 years ago"Fix #200" - yasm.rules double quote issue
Brian Gladman [Fri, 8 Jan 2010 09:47:46 +0000 (09:47 -0000)]
"Fix #200" - yasm.rules double quote issue

svn path=/trunk/yasm/; revision=2270

14 years agoUpdate autoconf/automake scripts.
Peter Johnson [Thu, 7 Jan 2010 07:00:05 +0000 (07:00 -0000)]
Update autoconf/automake scripts.

Also remove ltmain.sh as we no longer use libtool.

Patch submitted by: Roumen Petrov <bugtrack@roumenpetrov.info>

svn path=/trunk/yasm/; revision=2269

14 years agoUnbreak make distcheck.
Peter Johnson [Thu, 7 Jan 2010 06:55:03 +0000 (06:55 -0000)]
Unbreak make distcheck.

svn path=/trunk/yasm/; revision=2268

14 years ago1. Add gas preprocessor build on Windows
Brian Gladman [Tue, 5 Jan 2010 16:01:53 +0000 (16:01 -0000)]
1. Add gas preprocessor build on Windows
2. Add snprintf -> _snprintf define for VC++ build

svn path=/trunk/yasm/; revision=2267

14 years agoNow that the gas preproc supports .rept, remove it from the gas parser.
Peter Johnson [Sun, 3 Jan 2010 22:02:30 +0000 (22:02 -0000)]
Now that the gas preproc supports .rept, remove it from the gas parser.

svn path=/trunk/yasm/; revision=2266

14 years agoGAS preproc: Fix line number for .rept without matching .endr error.
Peter Johnson [Sun, 3 Jan 2010 21:59:28 +0000 (21:59 -0000)]
GAS preproc: Fix line number for .rept without matching .endr error.

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

14 years agoUpdate Pyxelator to avoid deprecation warnings on recent Python versions.
Peter Johnson [Sun, 3 Jan 2010 03:47:16 +0000 (03:47 -0000)]
Update Pyxelator to avoid deprecation warnings on recent Python versions.

svn path=/trunk/yasm/; revision=2264

14 years agobin-objfmt.c: Comment out unused function (kept in the code for debugging).
Peter Johnson [Sun, 3 Jan 2010 02:47:28 +0000 (02:47 -0000)]
bin-objfmt.c: Comment out unused function (kept in the code for debugging).

svn path=/trunk/yasm/; revision=2263

14 years agoFix two more instances of queue.h HEAD macros for portability.
Peter Johnson [Sun, 3 Jan 2010 02:46:11 +0000 (02:46 -0000)]
Fix two more instances of queue.h HEAD macros for portability.

svn path=/trunk/yasm/; revision=2262

14 years agogas-preproc.c: Avoid warning on unused variable.
Peter Johnson [Sun, 3 Jan 2010 02:41:50 +0000 (02:41 -0000)]
gas-preproc.c: Avoid warning on unused variable.

svn path=/trunk/yasm/; revision=2261

14 years agoImprove the gas preprocessor and re-add it as default for gas parser.
Peter Johnson [Sun, 3 Jan 2010 02:04:13 +0000 (02:04 -0000)]
Improve the gas preprocessor and re-add it as default for gas parser.

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

14 years agoImplement some linemap changes required for the GAS preprocessor.
Peter Johnson [Sun, 3 Jan 2010 01:58:23 +0000 (01:58 -0000)]
Implement some linemap changes required for the GAS preprocessor.

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

14 years agoUse queue.h HEAD macros more portably (also avoiding compiler warning).
Peter Johnson [Sun, 3 Jan 2010 01:04:18 +0000 (01:04 -0000)]
Use queue.h HEAD macros more portably (also avoiding compiler warning).

svn path=/trunk/yasm/; revision=2258

14 years agoFix additional cases of duplicate 66h prefix generation for AVX instructions.
Peter Johnson [Sat, 2 Jan 2010 17:56:16 +0000 (17:56 -0000)]
Fix additional cases of duplicate 66h prefix generation for AVX instructions.

Reported by: Gil Dabah

svn path=/trunk/yasm/; revision=2257

14 years agoUse Cython instead of Pyrex.
Peter Johnson [Fri, 1 Jan 2010 20:55:07 +0000 (20:55 -0000)]
Use Cython instead of Pyrex.

svn path=/trunk/yasm/; revision=2256

14 years agoSome minor Pyrex fixes:
Peter Johnson [Fri, 1 Jan 2010 20:54:15 +0000 (20:54 -0000)]
Some minor Pyrex fixes:
- Don't return self in IntNum.__abs__ (return a copy instead).
- yasm_sym_status enum values have YASM_ prefixes.

svn path=/trunk/yasm/; revision=2255

14 years agoAll Pyrex files: Use __cinit__ instead of __new__ in extension classes.
Peter Johnson [Fri, 1 Jan 2010 20:52:25 +0000 (20:52 -0000)]
All Pyrex files: Use __cinit__ instead of __new__ in extension classes.

svn path=/trunk/yasm/; revision=2254

14 years agoyasm_intnum_create_sized(): Fix off-by-one error in sign extension check.
Peter Johnson [Fri, 1 Jan 2010 20:47:58 +0000 (20:47 -0000)]
yasm_intnum_create_sized(): Fix off-by-one error in sign extension check.

svn path=/trunk/yasm/; revision=2253

14 years agoUnbreak python bindings on 64-bit Linux.
Peter Johnson [Wed, 30 Dec 2009 06:21:24 +0000 (06:21 -0000)]
Unbreak python bindings on 64-bit Linux.

svn path=/trunk/yasm/; revision=2252

14 years agoAvoid generating duplicate 66h prefix on PINSRB in 16-bit mode.
Peter Johnson [Tue, 29 Dec 2009 06:18:25 +0000 (06:18 -0000)]
Avoid generating duplicate 66h prefix on PINSRB in 16-bit mode.

Reported by: Gil Dabah <arkon@ragestorm.net>

svn path=/trunk/yasm/; revision=2251

14 years agoRevert gas parser default to raw preproc until gas tests pass with the gas
Peter Johnson [Mon, 28 Dec 2009 05:23:46 +0000 (05:23 -0000)]
Revert gas parser default to raw preproc until gas tests pass with the gas
preproc.

svn path=/trunk/yasm/; revision=2250

14 years agoFix incorrect vaesimc encoding (need to set VEX.vvvv=1111).
Peter Johnson [Mon, 28 Dec 2009 04:40:30 +0000 (04:40 -0000)]
Fix incorrect vaesimc encoding (need to set VEX.vvvv=1111).

Reported by: Gil Dabah <arkon@ragestorm.net>

svn path=/trunk/yasm/; revision=2249

15 years agoFix --preproc-only (and possibly other long options) by avoiding false
Peter Johnson [Sat, 26 Dec 2009 04:41:21 +0000 (04:41 -0000)]
Fix --preproc-only (and possibly other long options) by avoiding false
matches on shorter long argument names.

Contributed by: Alexei Svitkine <alexei.svitkine@gmail.com>

svn path=/trunk/yasm/; revision=2248

15 years agogas-preproc.c: Avoid casting away of const.
Peter Johnson [Sat, 26 Dec 2009 04:38:27 +0000 (04:38 -0000)]
gas-preproc.c: Avoid casting away of const.

svn path=/trunk/yasm/; revision=2247

15 years agoUpdate gas preproc a bit:
Peter Johnson [Sat, 26 Dec 2009 04:30:39 +0000 (04:30 -0000)]
Update gas preproc a bit:
- 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

15 years agonasm-pp.c: Use vsnprintf if available.
Peter Johnson [Sat, 26 Dec 2009 04:28:40 +0000 (04:28 -0000)]
nasm-pp.c: Use vsnprintf if available.

Patch contributed by: Alexei Svitkine <alexei.svitkine@gmail.com>

svn path=/trunk/yasm/; revision=2245

15 years agoDefault to gas preproc for gas parser.
Peter Johnson [Sat, 26 Dec 2009 04:26:46 +0000 (04:26 -0000)]
Default to gas preproc for gas parser.

svn path=/trunk/yasm/; revision=2244

15 years agoAdd initial gas preprocessor, contributed by Alexei Svitkine.
Peter Johnson [Wed, 23 Dec 2009 06:45:17 +0000 (06:45 -0000)]
Add initial gas preprocessor, contributed by Alexei Svitkine.
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

15 years agoUnbreak gen_x86_insn.py on Python 2.4.
Peter Johnson [Sun, 6 Dec 2009 03:37:43 +0000 (03:37 -0000)]
Unbreak gen_x86_insn.py on Python 2.4.

Patch by: Alexei Svitkine <alexei.svitkine@gmail.com>

svn path=/trunk/yasm/; revision=2242

15 years agoAdd files for building YASM with Visual Studio 2010 (beta 2)
Brian Gladman [Sat, 5 Dec 2009 16:33:12 +0000 (16:33 -0000)]
Add files for building YASM with Visual Studio 2010 (beta 2)

svn path=/trunk/yasm/; revision=2241

15 years agoUpdate gen_x86_insn.py to work in both Python 2 and 3
Brian Gladman [Sat, 5 Dec 2009 16:13:05 +0000 (16:13 -0000)]
Update gen_x86_insn.py to work in both Python 2 and 3

svn path=/trunk/yasm/; revision=2240

15 years agoFix #198: Previous commit accidentally broke a great many instructions.
Peter Johnson [Tue, 1 Dec 2009 03:33:03 +0000 (03:33 -0000)]
Fix #198: Previous commit accidentally broke a great many instructions.

svn path=/trunk/yasm/; revision=2239

15 years agoFix a bunch of GAS x86 instruction issues.
Peter Johnson [Mon, 30 Nov 2009 03:43:10 +0000 (03:43 -0000)]
Fix a bunch of GAS x86 instruction issues.
- 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

15 years agoFix #191: Incorrect argument order generated for AMD FMA4 opcodes.
Peter Johnson [Sun, 8 Nov 2009 17:30:34 +0000 (17:30 -0000)]
Fix #191: Incorrect argument order generated for AMD FMA4 opcodes.

svn path=/trunk/yasm/; revision=2237

15 years agoFix #190: Incorrect opcode generated for vphaddudq.
Peter Johnson [Sun, 8 Nov 2009 17:14:01 +0000 (17:14 -0000)]
Fix #190: Incorrect opcode generated for vphaddudq.

svn path=/trunk/yasm/; revision=2236

15 years agoFix #189: Avoid compiler warning in genperf.
Peter Johnson [Tue, 3 Nov 2009 05:15:37 +0000 (05:15 -0000)]
Fix #189: Avoid compiler warning in genperf.

svn path=/trunk/yasm/; revision=2235

15 years agoFix #187: Add new variable CFLAGS_FOR_BUILD for CC_FOR_BUILD compiles.
Peter Johnson [Sat, 31 Oct 2009 21:52:42 +0000 (21:52 -0000)]
Fix #187: Add new variable CFLAGS_FOR_BUILD for CC_FOR_BUILD compiles.

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

15 years agoFix #188: Times forward references would result in bad code generation.
Peter Johnson [Sat, 31 Oct 2009 21:45:55 +0000 (21:45 -0000)]
Fix #188: Times forward references would result in bad code generation.

svn path=/trunk/yasm/; revision=2233

15 years agoFix #78 further: Support C++ style // comments.
Peter Johnson [Sat, 12 Sep 2009 02:38:35 +0000 (02:38 -0000)]
Fix #78 further: Support C++ style // comments.

svn path=/trunk/yasm/; revision=2232

15 years agoFurther change to python invocation in genperf
Brian Gladman [Wed, 12 Aug 2009 14:51:57 +0000 (14:51 -0000)]
Further change to python invocation in genperf

svn path=/trunk/yasm/; revision=2231

15 years agoimprove handling of Python batch file for genperf
Brian Gladman [Wed, 12 Aug 2009 14:33:52 +0000 (14:33 -0000)]
improve handling of Python batch file for genperf

svn path=/trunk/yasm/; revision=2230

15 years agoFix #186: Avoid memory runaway in optimizer TIMES circular reference checking.
Peter Johnson [Thu, 6 Aug 2009 07:13:11 +0000 (07:13 -0000)]
Fix #186: Avoid memory runaway in optimizer TIMES circular reference checking.

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

15 years agoFix #185: Add mkinstalldirs to svn repo, as autogen.sh doesn't pull it in.
Peter Johnson [Fri, 31 Jul 2009 02:50:19 +0000 (02:50 -0000)]
Fix #185: Add mkinstalldirs to svn repo, as autogen.sh doesn't pull it in.

svn path=/trunk/yasm/; revision=2227

15 years agoFix #184: test -e is not portable (despite being in POSIX); use test -f instead.
Peter Johnson [Thu, 30 Jul 2009 02:19:38 +0000 (02:19 -0000)]
Fix #184: test -e is not portable (despite being in POSIX); use test -f instead.

svn path=/trunk/yasm/; revision=2226

15 years agoUnbreak distcheck.
Peter Johnson [Sat, 25 Jul 2009 05:29:47 +0000 (05:29 -0000)]
Unbreak distcheck.

svn path=/trunk/yasm/; revision=2224

15 years agoFix #178: Don't "distribute" shift right op.
Peter Johnson [Fri, 24 Jul 2009 19:01:35 +0000 (19:01 -0000)]
Fix #178: Don't "distribute" shift right op.

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

15 years agoUpdate elf special symbols:
Peter Johnson [Wed, 22 Jul 2009 05:51:35 +0000 (05:51 -0000)]
Update elf special symbols:
 - Add tlsdesc and tlscall to both x86 and amd64.
 - Add 64-bit pltoff, gotplt, gotoff to amd64.

svn path=/trunk/yasm/; revision=2210

15 years agoUnbreak make check (broken by [2206]).
Peter Johnson [Wed, 22 Jul 2009 05:49:54 +0000 (05:49 -0000)]
Unbreak make check (broken by [2206]).

svn path=/trunk/yasm/; revision=2209

15 years agoelf: Add latest x86 relocation types.
Peter Johnson [Wed, 22 Jul 2009 05:45:03 +0000 (05:45 -0000)]
elf: Add latest x86 relocation types.

svn path=/trunk/yasm/; revision=2208

15 years agoelf: Add support for 64-bit PC-relative relocation.
Peter Johnson [Tue, 21 Jul 2009 06:49:44 +0000 (06:49 -0000)]
elf: Add support for 64-bit PC-relative relocation.

svn path=/trunk/yasm/; revision=2207

15 years agoSpecial-case _GLOBAL_OFFSET_TABLE_ in elf32/64 to generate appropriate relocs.
Peter Johnson [Tue, 21 Jul 2009 06:48:42 +0000 (06:48 -0000)]
Special-case _GLOBAL_OFFSET_TABLE_ in elf32/64 to generate appropriate relocs.

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

15 years agoNASM is now licensed under the 2-clause BSD license.
Peter Johnson [Mon, 20 Jul 2009 06:04:58 +0000 (06:04 -0000)]
NASM is now licensed under the 2-clause BSD license.

svn path=/trunk/yasm/; revision=2205

15 years agoFix #177: Make check fails on CR/LF systems.
Peter Johnson [Sat, 18 Jul 2009 02:33:10 +0000 (02:33 -0000)]
Fix #177: Make check fails on CR/LF systems.

The diff on the hexdump output was not using -w.

svn path=/trunk/yasm/; revision=2204

15 years agoFix #175: Only sanity check final section size if no user errors occurred.
Peter Johnson [Fri, 12 Jun 2009 07:06:16 +0000 (07:06 -0000)]
Fix #175: Only sanity check final section size if no user errors occurred.

svn path=/trunk/yasm/; revision=2203

15 years agoFix #173: Debug full paths were being generated incorrectly.
Peter Johnson [Wed, 3 Jun 2009 05:49:18 +0000 (05:49 -0000)]
Fix #173: Debug full paths were being generated incorrectly.
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

15 years agoFix #171: Broken build in ytasm CMakeLists.txt.
Peter Johnson [Tue, 12 May 2009 01:47:59 +0000 (01:47 -0000)]
Fix #171: Broken build in ytasm CMakeLists.txt.

Reported by: postmodern.mod3

svn path=/trunk/yasm/; revision=2201

15 years agoCMakeLists.txt: Set cmake policy to avoid warning.
Peter Johnson [Tue, 12 May 2009 01:46:42 +0000 (01:46 -0000)]
CMakeLists.txt: Set cmake policy to avoid warning.

svn path=/trunk/yasm/; revision=2200

15 years agoAdd support for AMD XOP, FMA4, and CVT16 instructions (replacing SSE5).
Peter Johnson [Sun, 10 May 2009 05:24:46 +0000 (05:24 -0000)]
Add support for AMD XOP, FMA4, and CVT16 instructions (replacing SSE5).

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

15 years agoAdd gencheck.py Python script to make it easier to generate expected results
Peter Johnson [Sun, 10 May 2009 05:21:26 +0000 (05:21 -0000)]
Add gencheck.py Python script to make it easier to generate expected results
from long .asm files that generate simple binary output (e.g. for opcode
testing).

svn path=/trunk/yasm/; revision=2198

15 years agotasm (tweaked nasm) preproc fixes:
Peter Johnson [Fri, 17 Apr 2009 03:25:08 +0000 (03:25 -0000)]
tasm (tweaked nasm) preproc fixes:
 - 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

15 years agotasm parser: Support "not" keyword.
Peter Johnson [Fri, 17 Apr 2009 03:22:25 +0000 (03:22 -0000)]
tasm parser: Support "not" keyword.

Requested by: Rugxulo <rugxulo@gmail.com>

svn path=/trunk/yasm/; revision=2196

15 years agoDefault memory size to "s" for no-suffix FP conversions in GAS syntax.
Peter Johnson [Sun, 29 Mar 2009 23:25:05 +0000 (23:25 -0000)]
Default memory size to "s" for no-suffix FP conversions in GAS syntax.

Reported by: Gregory McGarry <g.mcgarry@ieee.org>

svn path=/trunk/yasm/; revision=2192

15 years agoFix referencing of local label from line that defines nonlocal label.
Peter Johnson [Wed, 25 Mar 2009 03:40:59 +0000 (03:40 -0000)]
Fix referencing of local label from line that defines nonlocal label.

Reported by: Brian Gladman

svn path=/trunk/yasm/; revision=2190

15 years agoUpdate copyright dates.
Peter Johnson [Tue, 24 Mar 2009 06:47:38 +0000 (06:47 -0000)]
Update copyright dates.

svn path=/trunk/yasm/; revision=2188

15 years agoFix #155: Don't crash on missing %endmacro.
Peter Johnson [Tue, 24 Mar 2009 06:33:32 +0000 (06:33 -0000)]
Fix #155: Don't crash on missing %endmacro.

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

15 years agoRemove vc7 and vc8 build files, as they're no longer being maintained.
Peter Johnson [Tue, 24 Mar 2009 05:04:15 +0000 (05:04 -0000)]
Remove vc7 and vc8 build files, as they're no longer being maintained.
There's a Python script (vc98_swap.py) in the Mkfiles/vc9 directory for
those who want to build with vc8.

svn path=/trunk/yasm/; revision=2184

15 years agoRename tasm to ytasm in Unix builds.
Peter Johnson [Tue, 24 Mar 2009 04:58:46 +0000 (04:58 -0000)]
Rename tasm to ytasm in Unix builds.
We aren't compatible enough to call ourselves the "real" one.

svn path=/trunk/yasm/; revision=2183

15 years agoUpdate code generated for alignment padding for more recent processors.
Peter Johnson [Fri, 20 Mar 2009 07:36:49 +0000 (07:36 -0000)]
Update code generated for alignment padding for more recent processors.
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

15 years agoUse arrays instead of strings to store NOP fill.
Peter Johnson [Fri, 20 Mar 2009 05:24:16 +0000 (05:24 -0000)]
Use arrays instead of strings to store NOP fill.

svn path=/trunk/yasm/; revision=2180

15 years agoAdd (but don't enable) AMD K10 alignment padding data
Brian Gladman [Wed, 18 Mar 2009 19:57:37 +0000 (19:57 -0000)]
Add (but don't enable) AMD K10 alignment padding data

svn path=/trunk/yasm/; revision=2179

15 years agoUpdate yasm.rules file for VC++
Brian Gladman [Fri, 6 Mar 2009 09:18:56 +0000 (09:18 -0000)]
Update yasm.rules file for VC++

svn path=/trunk/yasm/; revision=2178

15 years agoRemove renamed tasm.vcproj (as of [2175] it is ytasm.vcproj).
Peter Johnson [Wed, 4 Mar 2009 07:41:59 +0000 (07:41 -0000)]
Remove renamed tasm.vcproj (as of [2175] it is ytasm.vcproj).
Add to distribution files.

svn path=/trunk/yasm/; revision=2177

15 years agoUnbreak snapshots (broken in [2172]).
Peter Johnson [Wed, 4 Mar 2009 07:39:02 +0000 (07:39 -0000)]
Unbreak snapshots (broken in [2172]).

Noticed by: Mark Charney <mark.charney@intel.com>

svn path=/trunk/yasm/; revision=2176

15 years agoTidy up VC++ project names for ytasm
Brian Gladman [Thu, 26 Feb 2009 09:58:33 +0000 (09:58 -0000)]
Tidy up VC++ project names for ytasm

svn path=/trunk/yasm/; revision=2175

15 years agorename tasm for VC++
Brian Gladman [Wed, 25 Feb 2009 18:33:05 +0000 (18:33 -0000)]
rename tasm for VC++

svn path=/trunk/yasm/; revision=2174

15 years agoAdd support for VEX-encoded pclmul*qdq instructions per the latest AVX spec.
Peter Johnson [Mon, 2 Feb 2009 08:20:12 +0000 (08:20 -0000)]
Add support for VEX-encoded pclmul*qdq instructions per the latest AVX spec.
To stay consist with handling of other VEX instructions, also add yasm
extensions to support combining the first two operands for direct translation
from non-VEX to VEX-encoded by simply adding a "v" prefix to the opcode.

Contributed by: Mark Charney, Intel Corporation <Mark.Charney@intel.com>
Yasm extensions by: Peter Johnson

svn path=/trunk/yasm/; revision=2173

15 years agoFix #166: Off-by-one error in raw preproc caused hang on lines longer than
Peter Johnson [Tue, 27 Jan 2009 06:38:14 +0000 (06:38 -0000)]
Fix #166: Off-by-one error in raw preproc caused hang on lines longer than
512 characters.

svn path=/trunk/yasm/; revision=2172

15 years agoAdd file missed in previous commit.
Peter Johnson [Wed, 14 Jan 2009 08:34:22 +0000 (08:34 -0000)]
Add file missed in previous commit.

Contributed by: Mark Charney, Intel Corporation

svn path=/trunk/yasm/; revision=2171

15 years agoUpdate AVX and FMA to latest Intel specification (Dec 2008).
Peter Johnson [Wed, 14 Jan 2009 08:28:13 +0000 (08:28 -0000)]
Update AVX and FMA to latest Intel specification (Dec 2008).
- Removed VPERMIL2 opcodes (VPERMIL2PS, VPERMIL2PD).
- Replaced 4-operand FMA instructions with completely new set of opcodes.

Contributed by: Mark Charney, Intel Corporation <mark.charney@intel.com>

svn path=/trunk/yasm/; revision=2170

15 years agogas parser: Allow segment register prefixes before instructions.
Peter Johnson [Fri, 2 Jan 2009 20:46:57 +0000 (20:46 -0000)]
gas parser: Allow segment register prefixes before instructions.

svn path=/trunk/yasm/; revision=2169

15 years agogas parser: Allow equ's to be named the same as instructions.
Peter Johnson [Fri, 2 Jan 2009 20:32:05 +0000 (20:32 -0000)]
gas parser: Allow equ's to be named the same as instructions.

svn path=/trunk/yasm/; revision=2168

15 years agoRemove long-obsolete "debug" flag from internal parser structures.
Peter Johnson [Fri, 2 Jan 2009 08:36:09 +0000 (08:36 -0000)]
Remove long-obsolete "debug" flag from internal parser structures.

svn path=/trunk/yasm/; revision=2167

15 years agoAllow @ signs in identifiers in win32/win64 only.
Peter Johnson [Fri, 2 Jan 2009 08:33:21 +0000 (08:33 -0000)]
Allow @ signs in identifiers in win32/win64 only.
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

15 years agoelf-x86id.asm testcase: Don't require NASM preproc.
Peter Johnson [Fri, 2 Jan 2009 08:15:58 +0000 (08:15 -0000)]
elf-x86id.asm testcase: Don't require NASM preproc.

svn path=/trunk/yasm/; revision=2165

15 years agoGas parser: Move instruction/prefix lookup from tokenizer to parser.
Peter Johnson [Fri, 2 Jan 2009 07:27:39 +0000 (07:27 -0000)]
Gas parser: Move instruction/prefix lookup from tokenizer to parser.
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

16 years agogas-parse.c: Fix double-free on error.
Peter Johnson [Wed, 24 Dec 2008 06:17:54 +0000 (06:17 -0000)]
gas-parse.c: Fix double-free on error.

svn path=/trunk/yasm/; revision=2163

16 years agoLegalize effective addresses such as [eax*2+ebx*2-ebx].
Peter Johnson [Sun, 21 Dec 2008 10:57:36 +0000 (10:57 -0000)]
Legalize effective addresses such as [eax*2+ebx*2-ebx].
These were incorrectly identified as invalid.  The code would see the
ebx*2 term and identify ebx as the index register.  After the ebx was
subtracted, the ebx remained in the index register slot, so eax*2 had
nowhere to go.  The code now recognizes this case and frees the slot
when the -ebx is processed, leaving the index register selection up
to the main part of the code.

svn path=/trunk/yasm/; revision=2162

16 years agoFix Mach-O alignment handling by aligning start and end of every section.
Peter Johnson [Sun, 7 Dec 2008 02:49:22 +0000 (02:49 -0000)]
Fix Mach-O alignment handling by aligning start and end of every section.

Reported and patch by: David DeHaven <dave@sagetv.com>

svn path=/trunk/yasm/; revision=2161

16 years agogen_x86_insn.py: Handle invalid rcstag.
Peter Johnson [Fri, 5 Dec 2008 07:13:33 +0000 (07:13 -0000)]
gen_x86_insn.py: Handle invalid rcstag.
This can happen if somehow this file is retrieved without expanded keywords
(e.g. directly from the webpage, or via something like git-svn).

Reported by: Patrick Walton <pcwalton@cs.ucla.edu>

svn path=/trunk/yasm/; revision=2160

16 years agoDon't assume CPP_PROG is 3 characters long (e.g. "gcc -E" isn't).
Peter Johnson [Tue, 25 Nov 2008 09:16:26 +0000 (09:16 -0000)]
Don't assume CPP_PROG is 3 characters long (e.g. "gcc -E" isn't).

Reported and fix submitted by: Mark Charney

svn path=/trunk/yasm/; revision=2159

16 years agoFix #161: Don't require 0d/0e/0f/0t prefix on floating point numbers.
Peter Johnson [Thu, 30 Oct 2008 07:36:25 +0000 (07:36 -0000)]
Fix #161: Don't require 0d/0e/0f/0t prefix on floating point numbers.
While this is not mentioned in the GAS documentation, GAS doesn't require it.

svn path=/trunk/yasm/; revision=2158

16 years agoFix #157: Use UNIX (not Windows) path functions on cygwin platform.
Peter Johnson [Sun, 19 Oct 2008 07:29:15 +0000 (07:29 -0000)]
Fix #157: Use UNIX (not Windows) path functions on cygwin platform.

svn path=/trunk/yasm/; revision=2157

16 years agoAdd movbe instruction and CPU feature.
Peter Johnson [Thu, 16 Oct 2008 02:44:49 +0000 (02:44 -0000)]
Add movbe instruction and CPU feature.

Noticed by: Mark Charney

svn path=/trunk/yasm/; revision=2156

16 years agoUpdate Makefile.am for vc98_swap.py.
Peter Johnson [Thu, 9 Oct 2008 04:37:12 +0000 (04:37 -0000)]
Update Makefile.am for vc98_swap.py.

svn path=/trunk/yasm/; revision=2152

16 years agoChange to Python for Visual Studio 2008/2005 conversion (vc98_swap.py in place of...
Brian Gladman [Wed, 8 Oct 2008 08:48:18 +0000 (08:48 -0000)]
Change to Python for Visual Studio 2008/2005 conversion (vc98_swap.py in place of vc928.c)

svn path=/trunk/yasm/; revision=2151