Commit graph

2221 commits

Author SHA1 Message Date
Peter Johnson
3bf0ed3927 Fix lar and lsl second operand size.
Also support 32-bit second operand for extra compatibility against ISA
documentation, although only the low 16 bits are used.

Fixes #261.
2011-05-29 13:14:22 -07:00
Jari Aalto
49c9e09429 frontends/yasm/yasm.xml: Use GNU layout and put --help option to the end
Signed-off-by: Jari Aalto <jari.aalto@cante.net>
Signed-off-by: Peter Johnson <peter@tortall.net>
2011-05-29 12:56:17 -07:00
Peter Johnson
1143fb7520 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 "./".
2011-03-20 21:18:01 -07:00
Brian Gladman
db258a7b50 1. Tidy up VS 2010 build
2. Set correct VS tool path on win32 systems

svn path=/trunk/yasm/; revision=2368
2011-01-29 10:50:25 +00:00
Peter Johnson
65f6f7a1ff 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
2010-09-06 19:33:25 +00:00
Peter Johnson
5355299056 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
2010-08-21 07:32:54 +00:00
Peter Johnson
bafc905860 coff: Add support for gas .secrel32 directive.
svn path=/trunk/yasm/; revision=2365
2010-08-18 06:23:30 +00:00
Peter Johnson
7263e1d241 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
2010-08-18 06:23:06 +00:00
Peter Johnson
50017b49af Add prototype for yasm_dv_get_value().
svn path=/trunk/yasm/; revision=2363
2010-08-18 06:21:34 +00:00
Peter Johnson
72df1b52a2 Add yasm_dv_get_value() to get yasm_value from yasm_dataval.
svn path=/trunk/yasm/; revision=2362
2010-08-18 06:21:08 +00:00
Peter Johnson
2f82e3a7ba coff dir_def(): Use symtab_use() instead of symtab_get().
svn path=/trunk/yasm/; revision=2361
2010-08-17 05:36:18 +00:00
Peter Johnson
5fb3213be3 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
2010-08-17 05:32:46 +00:00
Peter Johnson
985038f102 dwarf2: Add support for .loc "discriminator" option.
svn path=/trunk/yasm/; revision=2359
2010-08-16 02:28:36 +00:00
Peter Johnson
2678cb3c3a 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
2010-08-14 02:26:41 +00:00
Peter Johnson
3ef8f426d7 Bump trunk internal version to 1.1.99.
svn path=/trunk/yasm/; revision=2351
2010-08-06 08:14:51 +00:00
Peter Johnson
0d3b3797e5 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
2010-08-01 17:44:56 +00:00
Peter Johnson
a0a5404f14 win32: Make external safeseh work again (broken in [2343]).
svn path=/trunk/yasm/; revision=2347
2010-08-01 17:31:12 +00:00
Peter Johnson
f288243be4 Rename RDRND feature bit to RDRAND.
svn path=/trunk/yasm/; revision=2346
2010-08-01 01:37:37 +00:00
Peter Johnson
abaf3f7d49 macho32: Correctly output pc-relative non-external intersegment.
Reported by: Justin Lebar <justin.lebar@gmail.com>

svn path=/trunk/yasm/; revision=2345
2010-08-01 01:27:40 +00:00
Peter Johnson
a4024ab0ca macho: Fix relocation table file location.
svn path=/trunk/yasm/; revision=2344
2010-08-01 01:05:04 +00:00
Peter Johnson
86534657f2 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
2010-07-31 10:17:05 +00:00
Brian Gladman
71afeff2eb Remove some causes of unnecessary rebuilds on Windows (VC10 only)
svn path=/trunk/yasm/; revision=2342
2010-07-27 18:20:22 +00:00
Peter Johnson
ea41f1e4e5 gen_x86_insn.py: Add SMX to list of ordered_cpu_features.
svn path=/trunk/yasm/; revision=2340
2010-07-23 03:36:01 +00:00
Peter Johnson
b716897f33 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
2010-07-23 03:35:21 +00:00
Peter Johnson
472838271c Fix #212: Set LC_SEGMENT vmsize correctly.
svn path=/trunk/yasm/; revision=2338
2010-07-23 03:08:24 +00:00
Peter Johnson
548f983552 Add support for XSAVEOPT instruction.
Reported by: Mark Charney <mark.charney@intel.com>

svn path=/trunk/yasm/; revision=2337
2010-07-03 19:48:00 +00:00
Peter Johnson
81c903cd70 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
2010-07-03 02:29:22 +00:00
Peter Johnson
1227dda3c3 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
2010-07-02 21:27:43 +00:00
Peter Johnson
ff8d0e0909 Fix #207: Don't emit unnecessary REX.W for pinsrw.
svn path=/trunk/yasm/; revision=2334
2010-06-16 05:22:17 +00:00
Peter Johnson
d190d9dfa5 Fix #206: Update gettext bits to gettext 0.17.
svn path=/trunk/yasm/; revision=2333
2010-06-16 05:13:23 +00:00
Brian Gladman
1c6ad1742b Minor update to the Visual Studio 2010 build files
svn path=/trunk/yasm/; revision=2332
2010-06-08 17:12:48 +00:00
Brian Gladman
af34e08058 svn path=/trunk/yasm/; revision=2331 2010-06-08 16:30:52 +00:00
Brian Gladman
c766e43831 Add an environment variable YASMPATH to override the default vsyasm directory
svn path=/trunk/yasm/; revision=2330
2010-05-27 13:26:23 +00:00
Brian Gladman
3a14d898b2 correct reported error in vsyasm.xml
svn path=/trunk/yasm/; revision=2329
2010-05-27 08:46:46 +00:00
Brian Gladman
e5b53cf7e6 change vsyasm property sheet to use an absolute path to vsyasm (as msbuild requires)
svn path=/trunk/yasm/; revision=2328
2010-05-24 08:37:45 +00:00
Peter Johnson
104dba1981 Fix #201: explicitly ignore [warning] directive and treat as warning.
svn path=/trunk/yasm/; revision=2323
2010-05-16 03:37:00 +00:00
Peter Johnson
6c7cc8ef76 Support all unary operators in directive expressions.
svn path=/trunk/yasm/; revision=2322
2010-05-16 03:14:09 +00:00
Peter Johnson
d5ae195703 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
2010-05-15 07:45:48 +00:00
Peter Johnson
4003fa1bc0 Update frontend --version copyright dates.
svn path=/trunk/yasm/; revision=2317
2010-04-08 06:10:16 +00:00
Peter Johnson
34379be2ad COPYING: Update credits a bit.
svn path=/trunk/yasm/; revision=2314
2010-04-08 05:57:28 +00:00
Peter Johnson
e2e877c615 Update copyright dates.
svn path=/trunk/yasm/; revision=2313
2010-04-08 05:56:33 +00:00
Peter Johnson
bc3a8286ea 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
2010-04-08 03:46:43 +00:00
Peter Johnson
2de9ac8ede NASM preprocessor: Add %scope and %endscope.
Contributed by: Mathieu Monnier

svn path=/trunk/yasm/; revision=2311
2010-04-08 03:32:04 +00:00
Peter Johnson
323153d55a 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
2010-03-28 19:28:54 +00:00
Peter Johnson
e56ece9a7d vsyasm: Allow override of object, list, and map file extensions.
svn path=/trunk/yasm/; revision=2309
2010-03-19 23:00:36 +00:00
Peter Johnson
e55891a302 vsyasm: Fix map extension.
svn path=/trunk/yasm/; revision=2308
2010-03-19 22:46:16 +00:00
Brian Gladman
293d7392b4 Improve VSYASM integration into Visual Studio 2010
svn path=/trunk/yasm/; revision=2307
2010-03-10 11:33:55 +00:00
Peter Johnson
d7c5571bcb vsyasm: if -E is used, print command line as first line in error file.
Requested by: Brian Gladman

svn path=/trunk/yasm/; revision=2300
2010-03-04 05:13:48 +00:00
Peter Johnson
47b7b364c7 Makefile.am: Update for [2297] changes.
svn path=/trunk/yasm/; revision=2299
2010-03-04 05:08:00 +00:00
Brian Gladman
7b10030105 Adjust YASM integration into Visual Studio 2010 slightly
svn path=/trunk/yasm/; revision=2298
2010-03-03 10:31:37 +00:00