]> granicus.if.org Git - yasm/log
yasm
13 years agoFix test failure due to build environment. 1/head
Peter Johnson [Mon, 21 Mar 2011 04:18:01 +0000 (21:18 -0700)]
Fix test failure due to build environment.

When YASM_TEST_SUITE environment is defined, force version to "yasm
HEAD" and all yasm__getcwd() calls to return "./".

13 years ago1. Tidy up VS 2010 build
Brian Gladman [Sat, 29 Jan 2011 10:50:25 +0000 (10:50 -0000)]
1. Tidy up VS 2010 build
2. Set correct VS tool path on win32 systems

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

14 years agoFix #223: Correctly handle "./" paths in dwarf2.
Peter Johnson [Mon, 6 Sep 2010 19:33:25 +0000 (19:33 -0000)]
Fix #223: Correctly handle "./" paths in dwarf2.

As dwarf2 has a directory table in addition to a filename table, we split
the provided pathname when generating the filename table.  This correctly
combined both "./foo" and "foo" into a single filename table entry.
However, we were only matching on pathname instead of dir+filename when
actually generating the dwarf opcodes, resulting in not finding the "./foo"
version.  Fix to check both dir and filename separately, splitting the same
way we do when generating the filename table.

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

14 years agoImprove gas syntax .set directive to better match GNU as behavior.
Peter Johnson [Sat, 21 Aug 2010 07:32:54 +0000 (07:32 -0000)]
Improve gas syntax .set directive to better match GNU as behavior.

- Add support for deferred symbols (those which depend on other symbols
  that have not yet been .set)
- Add support for re-defining symbols
- Add support for 0x hex notation in literals

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

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

14 years agocoff: Add support for gas .secrel32 directive.
Peter Johnson [Wed, 18 Aug 2010 06:23:30 +0000 (06:23 -0000)]
coff: Add support for gas .secrel32 directive.

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

14 years agoImplement yasm_value_finalize_expr() using yasm_value_finalize().
Peter Johnson [Wed, 18 Aug 2010 06:23:06 +0000 (06:23 -0000)]
Implement yasm_value_finalize_expr() using yasm_value_finalize().

Previously this was implemented the opposite way, contrary to its
documentation.  This resulted in clearing any already set yasm_value
relative fields.

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

14 years agoAdd prototype for yasm_dv_get_value().
Peter Johnson [Wed, 18 Aug 2010 06:21:34 +0000 (06:21 -0000)]
Add prototype for yasm_dv_get_value().

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

14 years agoAdd yasm_dv_get_value() to get yasm_value from yasm_dataval.
Peter Johnson [Wed, 18 Aug 2010 06:21:08 +0000 (06:21 -0000)]
Add yasm_dv_get_value() to get yasm_value from yasm_dataval.

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

14 years agocoff dir_def(): Use symtab_use() instead of symtab_get().
Peter Johnson [Tue, 17 Aug 2010 05:36:18 +0000 (05:36 -0000)]
coff dir_def(): Use symtab_use() instead of symtab_get().

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

14 years agocoff/win32/win64: Add support for .def, .scl, .type, and .endef directives.
Peter Johnson [Tue, 17 Aug 2010 05:32:46 +0000 (05:32 -0000)]
coff/win32/win64: Add support for .def, .scl, .type, and .endef directives.

These can be used to set a specific value for the coff sclass and type
symbol fields.

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

14 years agodwarf2: Add support for .loc "discriminator" option.
Peter Johnson [Mon, 16 Aug 2010 02:28:36 +0000 (02:28 -0000)]
dwarf2: Add support for .loc "discriminator" option.

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

14 years agogas: Fix movsw/movzw memory operand encodings.
Peter Johnson [Sat, 14 Aug 2010 02:26:41 +0000 (02:26 -0000)]
gas: Fix movsw/movzw memory operand encodings.

The register versions worked okay due to size matching, but the memory
versions relied on suffix matching, which wasn't being generated correctly.

Reported by: Tony Goelz <cag@absoft.com>

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

14 years agoBump trunk internal version to 1.1.99.
Peter Johnson [Fri, 6 Aug 2010 08:14:51 +0000 (08:14 -0000)]
Bump trunk internal version to 1.1.99.

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

14 years agoFix #213: Fix gas-preproc misuse of strcpy() and uninitialized variables.
Peter Johnson [Sun, 1 Aug 2010 17:44:56 +0000 (17:44 -0000)]
Fix #213: Fix gas-preproc misuse of strcpy() and uninitialized variables.

- strcpy() was being used with overlapping memory ranges; switched to memmove().
- bline->line_number was not set in one location.

Exact causes identified using valgrind.

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

14 years agowin32: Make external safeseh work again (broken in [2343]).
Peter Johnson [Sun, 1 Aug 2010 17:31:12 +0000 (17:31 -0000)]
win32: Make external safeseh work again (broken in [2343]).

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

14 years agoRename RDRND feature bit to RDRAND.
Peter Johnson [Sun, 1 Aug 2010 01:37:37 +0000 (01:37 -0000)]
Rename RDRND feature bit to RDRAND.

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

14 years agomacho32: Correctly output pc-relative non-external intersegment.
Peter Johnson [Sun, 1 Aug 2010 01:27:40 +0000 (01:27 -0000)]
macho32: Correctly output pc-relative non-external intersegment.

Reported by: Justin Lebar <justin.lebar@gmail.com>

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

14 years agomacho: Fix relocation table file location.
Peter Johnson [Sun, 1 Aug 2010 01:05:04 +0000 (01:05 -0000)]
macho: Fix relocation table file location.

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

14 years agoFix #139: Fix a number of issues with win32 safeseh support.
Peter Johnson [Sat, 31 Jul 2010 10:17:05 +0000 (10:17 -0000)]
Fix #139: Fix a number of issues with win32 safeseh support.

- Always create a non-global absolute symbol @feat.00 with value of 1.
- Set type field to 0x20 (function) for safeseh-declared symbols.
- Force safeseh-declared symbols into the symbol table, but don't force
  them to be global.

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

14 years agoRemove some causes of unnecessary rebuilds on Windows (VC10 only)
Brian Gladman [Tue, 27 Jul 2010 18:20:22 +0000 (18:20 -0000)]
Remove some causes of unnecessary rebuilds on Windows (VC10 only)

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

14 years agogen_x86_insn.py: Add SMX to list of ordered_cpu_features.
Peter Johnson [Fri, 23 Jul 2010 03:36:01 +0000 (03:36 -0000)]
gen_x86_insn.py: Add SMX to list of ordered_cpu_features.

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

14 years agoFix #211: Add INVEPT, INVVPID, and GETSEC instructions.
Peter Johnson [Fri, 23 Jul 2010 03:35:21 +0000 (03:35 -0000)]
Fix #211: Add INVEPT, INVVPID, and GETSEC instructions.

INVEPT and INVVPID is enabled via the "eptvpid" cpu feature.
GETSEC is enabled via the "smx" cpu feature.

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

14 years agoFix #212: Set LC_SEGMENT vmsize correctly.
Peter Johnson [Fri, 23 Jul 2010 03:08:24 +0000 (03:08 -0000)]
Fix #212: Set LC_SEGMENT vmsize correctly.

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

14 years agoAdd support for XSAVEOPT instruction.
Peter Johnson [Sat, 3 Jul 2010 19:48:00 +0000 (19:48 -0000)]
Add support for XSAVEOPT instruction.

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

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

14 years agoAdd Intel post-32nm processor instructions (section 7 of AVX spec).
Peter Johnson [Sat, 3 Jul 2010 02:29:22 +0000 (02:29 -0000)]
Add Intel post-32nm processor instructions (section 7 of AVX spec).

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

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

14 years agoRemove AMD CVT16 instructions.
Peter Johnson [Fri, 2 Jul 2010 21:27:43 +0000 (21:27 -0000)]
Remove AMD CVT16 instructions.

Per http://sourceware.org/ml/binutils/2009-11/msg00372.html, this has been
removed from GNU as.

Several instructions also conflict with the latest Intel AVX instructions.

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

14 years agoFix #207: Don't emit unnecessary REX.W for pinsrw.
Peter Johnson [Wed, 16 Jun 2010 05:22:17 +0000 (05:22 -0000)]
Fix #207: Don't emit unnecessary REX.W for pinsrw.

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

14 years agoFix #206: Update gettext bits to gettext 0.17.
Peter Johnson [Wed, 16 Jun 2010 05:13:23 +0000 (05:13 -0000)]
Fix #206: Update gettext bits to gettext 0.17.

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

14 years agoMinor update to the Visual Studio 2010 build files
Brian Gladman [Tue, 8 Jun 2010 17:12:48 +0000 (17:12 -0000)]
Minor update to the Visual Studio 2010 build files

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

14 years agosvn path=/trunk/yasm/; revision=2331
Brian Gladman [Tue, 8 Jun 2010 16:30:52 +0000 (16:30 -0000)]
svn path=/trunk/yasm/; revision=2331

14 years agoAdd an environment variable YASMPATH to override the default vsyasm directory
Brian Gladman [Thu, 27 May 2010 13:26:23 +0000 (13:26 -0000)]
Add an environment variable YASMPATH to override the default vsyasm directory

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

14 years agocorrect reported error in vsyasm.xml
Brian Gladman [Thu, 27 May 2010 08:46:46 +0000 (08:46 -0000)]
correct reported error in vsyasm.xml

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

14 years agochange vsyasm property sheet to use an absolute path to vsyasm (as msbuild requires)
Brian Gladman [Mon, 24 May 2010 08:37:45 +0000 (08:37 -0000)]
change vsyasm property sheet to use an absolute path to vsyasm (as msbuild requires)

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

14 years agoFix #201: explicitly ignore [warning] directive and treat as warning.
Peter Johnson [Sun, 16 May 2010 03:37:00 +0000 (03:37 -0000)]
Fix #201: explicitly ignore [warning] directive and treat as warning.

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

14 years agoSupport all unary operators in directive expressions.
Peter Johnson [Sun, 16 May 2010 03:14:09 +0000 (03:14 -0000)]
Support all unary operators in directive expressions.

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

14 years agoFix #202 (incorrect GOT offset generated in NASM mode).
Peter Johnson [Sat, 15 May 2010 07:45:48 +0000 (07:45 -0000)]
Fix #202 (incorrect GOT offset generated in NASM mode).

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

14 years agoUpdate frontend --version copyright dates.
Peter Johnson [Thu, 8 Apr 2010 06:10:16 +0000 (06:10 -0000)]
Update frontend --version copyright dates.

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

14 years agoCOPYING: Update credits a bit.
Peter Johnson [Thu, 8 Apr 2010 05:57:28 +0000 (05:57 -0000)]
COPYING: Update credits a bit.

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

14 years agoUpdate copyright dates.
Peter Johnson [Thu, 8 Apr 2010 05:56:33 +0000 (05:56 -0000)]
Update copyright dates.

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

14 years agoNASM preproc: Add basic support for %{x:y} parameter list expansion.
Peter Johnson [Thu, 8 Apr 2010 03:46:43 +0000 (03:46 -0000)]
NASM preproc: Add basic support for %{x:y} parameter list expansion.

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

14 years agoNASM preprocessor: Add %scope and %endscope.
Peter Johnson [Thu, 8 Apr 2010 03:32:04 +0000 (03:32 -0000)]
NASM preprocessor: Add %scope and %endscope.

Contributed by: Mathieu Monnier

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

14 years agoInstead of initializing unknown sections en-masse during objfmt_output(),
Peter Johnson [Sun, 28 Mar 2010 19:28:54 +0000 (19:28 -0000)]
Instead of initializing unknown sections en-masse during objfmt_output(),
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

14 years agovsyasm: Allow override of object, list, and map file extensions.
Peter Johnson [Fri, 19 Mar 2010 23:00:36 +0000 (23:00 -0000)]
vsyasm: Allow override of object, list, and map file extensions.

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

14 years agovsyasm: Fix map extension.
Peter Johnson [Fri, 19 Mar 2010 22:46:16 +0000 (22:46 -0000)]
vsyasm: Fix map extension.

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

14 years agoImprove VSYASM integration into Visual Studio 2010
Brian Gladman [Wed, 10 Mar 2010 11:33:55 +0000 (11:33 -0000)]
Improve VSYASM integration into Visual Studio 2010

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

14 years agovsyasm: if -E is used, print command line as first line in error file.
Peter Johnson [Thu, 4 Mar 2010 05:13:48 +0000 (05:13 -0000)]
vsyasm: if -E is used, print command line as first line in error file.

Requested by: Brian Gladman

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

14 years agoMakefile.am: Update for [2297] changes.
Peter Johnson [Thu, 4 Mar 2010 05:08:00 +0000 (05:08 -0000)]
Makefile.am: Update for [2297] changes.

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

14 years agoAdjust YASM integration into Visual Studio 2010 slightly
Brian Gladman [Wed, 3 Mar 2010 10:31:37 +0000 (10:31 -0000)]
Adjust YASM integration into Visual Studio 2010 slightly

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

14 years agoAdd VSYASM integration files for Visual Studio 2010 (and remove incorrect YASM ones)
Brian Gladman [Wed, 3 Mar 2010 09:41:12 +0000 (09:41 -0000)]
Add VSYASM integration files for Visual Studio 2010 (and remove incorrect YASM ones)

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

14 years agoCorrection to Python detection on Windows
Brian Gladman [Thu, 25 Feb 2010 11:47:02 +0000 (11:47 -0000)]
Correction to Python detection on Windows

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

14 years agoYet one more attempt to find Python in Windows
Brian Gladman [Thu, 25 Feb 2010 10:57:07 +0000 (10:57 -0000)]
Yet one more attempt to find Python in Windows

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

14 years agoMake a further attempt to use the Windows registry to find Python
Brian Gladman [Wed, 24 Feb 2010 11:26:40 +0000 (11:26 -0000)]
Make a further attempt to use the Windows registry to find Python

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

14 years agocorrect error in python detection batch file
Brian Gladman [Tue, 23 Feb 2010 08:56:20 +0000 (08:56 -0000)]
correct error in python detection batch file

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

14 years agoHopefully remove python discovery issue in Windows build
Brian Gladman [Tue, 23 Feb 2010 08:15:43 +0000 (08:15 -0000)]
Hopefully remove python discovery issue in Windows build

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

14 years agovsyasm: More gracefully handle single input file by using output name as-is.
Peter Johnson [Fri, 19 Feb 2010 07:07:51 +0000 (07:07 -0000)]
vsyasm: More gracefully handle single input file by using output name as-is.

Patch by: Brian Gladman

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

14 years agoAdd vc10 and vsyasm build files to EXTRA_DIST.
Peter Johnson [Wed, 17 Feb 2010 06:33:26 +0000 (06:33 -0000)]
Add vc10 and vsyasm build files to EXTRA_DIST.

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

14 years agoUpdate Visual Studio 2010 build files
Brian Gladman [Mon, 15 Feb 2010 10:45:22 +0000 (10:45 -0000)]
Update Visual Studio 2010 build files

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

14 years ago1. Add vsyasm build to VC9 and vc10 builds
Brian Gladman [Sat, 13 Feb 2010 19:26:44 +0000 (19:26 -0000)]
1. Add vsyasm build to VC9 and vc10 builds
2. Improve search for Python interpreter

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

14 years agovsyasm: create intermediate output directories if necessary.
Peter Johnson [Sat, 13 Feb 2010 08:42:27 +0000 (08:42 -0000)]
vsyasm: create intermediate output directories if necessary.

This feature is apparently assumed by MSBUILD.

Contributed (with minor modifications) by: Brian Gladman

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

14 years agoUpdate yasm_parsers(7) now that GAS preprocessor support is fairly mature.
Peter Johnson [Sat, 13 Feb 2010 07:25:23 +0000 (07:25 -0000)]
Update yasm_parsers(7) now that GAS preprocessor support is fairly mature.

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

14 years agoAdd support for gas preprocessor macro directives.
Peter Johnson [Sat, 13 Feb 2010 07:22:23 +0000 (07:22 -0000)]
Add support for gas preprocessor macro directives.

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

14 years agoAdd "vsyasm", a batch version of yasm primarily useful for VS2010.
Peter Johnson [Sat, 6 Feb 2010 09:27:32 +0000 (09:27 -0000)]
Add "vsyasm", a batch version of yasm primarily useful for VS2010.

Basically the objfile, listfile, and mapfile options specify output
directories instead of files.  Multiple files are accepted and each one
is independently assembled in command line order.  All options (such
as include directories and predefined macros) apply to all input files.
Any error terminates the process early.

Suggested by: Brian Gladman

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

14 years agonasm_pp_cleanup(): Do a better job of cleaning up.
Peter Johnson [Sat, 6 Feb 2010 09:13:56 +0000 (09:13 -0000)]
nasm_pp_cleanup(): Do a better job of cleaning up.

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

14 years agoUpdate flat and DJGPP Makefiles for GAS preproc and parser changes.
Peter Johnson [Wed, 20 Jan 2010 03:58:15 +0000 (03:58 -0000)]
Update flat and DJGPP Makefiles for GAS preproc and parser changes.

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

14 years agoUpdate VC++ v10 build
Brian Gladman [Tue, 19 Jan 2010 11:11:35 +0000 (11:11 -0000)]
Update VC++ v10 build

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

14 years agoUpdate VC++ v9 build
Brian Gladman [Tue, 19 Jan 2010 11:09:21 +0000 (11:09 -0000)]
Update VC++ v9 build

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

14 years agoAdd .intel_syntax and .gas_syntax support to GAS parser.
Peter Johnson [Tue, 19 Jan 2010 07:57:43 +0000 (07:57 -0000)]
Add .intel_syntax and .gas_syntax support to GAS parser.

Uses the NASM parser for the .intel_syntax parsing heavy lifting.

Contributed by: Alexei Svitkine

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

14 years agoAdd nasm-parser-struct.h to SOURCES.
Peter Johnson [Tue, 19 Jan 2010 07:28:08 +0000 (07:28 -0000)]
Add nasm-parser-struct.h to SOURCES.

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

14 years agoNasm parser: Add some very basic MASM-ish syntax handling, along the lines
Peter Johnson [Tue, 19 Jan 2010 07:03:15 +0000 (07:03 -0000)]
Nasm parser: Add some very basic MASM-ish syntax handling, along the lines
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

14 years agoSplit yasm_parser_nasm structure out to separate header.
Peter Johnson [Tue, 19 Jan 2010 06:56:08 +0000 (06:56 -0000)]
Split yasm_parser_nasm structure out to separate header.

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

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