Commit graph

2221 commits

Author SHA1 Message Date
Vivek Thampi
0e7f34a025 Fix minor typo in the definition of pmulhrw
This change fixes the definition of "pmulhrw" where it is defined
as having the mnemonic "pmulhrwa".
2012-05-28 23:59:55 -07:00
Scott Graham
51b1f7ef98 fix a couple warnings when building on win32 2012-05-09 20:48:16 -07:00
Peter Johnson
82fafa7b56 Merge pull request #63 from nico/blah
Don't use a C++ comment in a C source file.
2012-03-12 23:58:35 -07:00
Nico Weber
203bc94f39 Don't use a C++ comment in a C source file. 2012-03-10 22:52:34 -08:00
Peter Johnson
8770f6073a Merge pull request #62 from nico/ticket246
In the Mach-O writer, only warn on ignored flags if the new flags are different from the old flags.

[#246 state:resolved]
2012-03-09 21:41:18 -08:00
Nico Weber
01ab853e68 In the Mach-O writer, only warn on ignored flags if the new flags
are different from the old flags.

Fixes http://tortall.lighthouseapp.com/projects/78676-yasm/tickets/246
2012-03-06 17:40:41 -08:00
Peter Johnson
cc06a6a43d Merge pull request #61 from fischman/master
Silence is golden: genperf emits too much stdout in success path
2012-03-02 14:38:30 -08:00
sergey semenko
916ff048f7 Added support for HSW TSX instructions:
XAXQUIRE
XRELEASE
XABORT
XBEGIN
XEND
XTEST

Also fixed a bug for CALL instruction (opcode 0xE8) - it allowed 16 bit operand with 0x66 prefix in 64 bit mode,
while 16 bit operand is not allowed at all in 64 bit mode.

Added X86_ACQREL prefix group for XACQUIRE/XRELEASE prefixes, since they need to be orthogonal to LOCKREP
prefixes, because TSX prefixes must come together with F0 (LOCK) prefix.

However this commit does not enforce using TSX hints only with instructions they are allowed to be used.
The reason for this is that lock prefix F0 itself is not enforced to be used only with lockable instructions, this seems to be a decision made by
Yasm developers, that user himself must take care of these situations.

Right now TSX hints can come with F0 prefix, can come with REPNE/REPZE prefixes, but they are used together in assembly, only the leftmost would be
encoded to the binary and warning will be issued. This is the behavior of Yasm for duplicate LOCKREP prefixes.
2012-03-02 14:36:30 -08:00
Jason Garrett-Glaser
a8495ad151 Add AMD TBM instructions.
Reference: http://support.amd.com/us/Processor_TechDocs/24594_APM_v3.pdf

Also add appropriate CPU bits and directive handling for these.
2012-03-02 14:29:21 -08:00
Ami Fischman
5f01ee0f94 Drop success-path chatter from genperf. 2012-03-02 14:12:19 -08:00
BrianGladman
827922d98d Add prebuild step for yasm-verssion.h 2011-10-31 18:38:16 +00:00
BrianGladman
d0084dc852 add path for YASM-VERSION.h 2011-10-31 17:40:10 +00:00
Peter Johnson
0f5e8ebdb5 Bump DEF_VER to 1.2.0 for release. 2011-10-31 00:29:42 -07:00
Peter Johnson
e437ef4292 Add Mkfiles/vc10/out_copy_rename.bat to distribution. 2011-10-31 00:29:42 -07:00
Peter Johnson
c0f152742f Copy YASM-VERSION.h to Mkfiles for distribution. 2011-10-31 00:29:42 -07:00
Peter Johnson
ab19547382 re2c: Work around tmpfile() issue on win32.
tmpfile() defaults to C:\, and on Windows 7 can run into permissions issues.
Add workaround implementation from cairo
(http://cgit.freedesktop.org/cairo/commit/?id=4fa46e3caaffb54f4419887418d8d0ea39816092)

See also: http://msdn.microsoft.com/en-us/library/x8x7sakw(v=VS.80).aspx
(community content section)
2011-10-31 00:29:42 -07:00
Peter Johnson
b334347286 win64: Default to nobase for .xdata section.
Also add ..imagebase special symbol to force use of a nobase relocation.

[#135 state:resolved]
2011-10-30 22:21:57 -07:00
Peter Johnson
2bd66514b6 re2c: Use tmpfile instead of fixed temporary filename.
This could cause a race condition when running parallel make.

Tracked down by Volker Braun.

[#238 state:resolved]
[#165 state:resolved]
2011-10-02 23:20:38 -07:00
Peter Johnson
cc4657a134 Merge pull request #60 from olsner/struc_base
Implement the base offset parameter for the struc macro
2011-10-02 22:11:01 -07:00
Simon Brenner
d19cbdabab Add testcase for struc with base offset 2011-10-02 06:03:29 +02:00
Simon Brenner
25a46fa5b0 Implement the base offset parameter to 'struc' 2011-10-02 06:03:29 +02:00
Peter Johnson
716c17112d nasm-pp.c: Plug a memory leak. 2011-09-30 12:52:32 -07:00
Peter Johnson
eb8b346157 Merge pull request #59 from pwo/patch-1
Fix clang warning.
2011-09-27 23:18:15 -07:00
Pawel Worach
a2cbb10ee1 Fix clang warning:
libyasm/md5.c:166:31: warning: argument to 'sizeof' in 'memset' call is the same expression as the destination; did you mean to dereference it? [-Wsizeof-pointer-memaccess]
        memset(ctx, 0, sizeof(ctx));    /* In case it's sensitive */
               ~~~            ^~~
2011-09-24 16:41:08 +03:00
Peter Johnson
0e3fa2d6d1 Makefile.am: Clean YASM-VERSION.h. 2011-09-03 21:27:21 -07:00
Peter Johnson
451bfd6374 Fix .gitignore for some wildcards. 2011-09-03 21:18:34 -07:00
Peter Johnson
e11ea9df14 Add missing macho32-pext test case. 2011-09-03 21:18:08 -07:00
Peter Johnson
c3b483199c Regenerate man pages. 2011-08-27 16:28:25 -07:00
Peter Johnson
7d58243134 macho: Support N_PEXT bit.
Can be enabled via use of "private_extern" in NASM syntax.

Patch by: Hironori Bono

[#215 state:resolved]
2011-08-27 10:01:26 -07:00
Peter Johnson
0ed2cc4451 Generate version number information from git history.
Due to the svn import structure, a special case is currently implemented
to look for the 1.1.0 branchpoint instead of the most recent tag on the
master branch.  This will be removed after the first release is tagged
on the master branch in git.

Specific details:

autogen.sh: More aggressively clean autoconf cache.
This is needed to ensure the version number is actually regenerated.

Don't generate PACKAGE_PATCHLEVEL or PACKAGE_BUILD variables.  The
genversion program now parses PACKAGE_VERSION directly.

For Mkfiles builds, YASM-VERSION.h is generated and included by the custom
config.h.  This avoids the need to edit config.h for versioning.
2011-08-27 09:25:30 -07:00
Peter Johnson
8281be0c25 Add .gitignore files.
These are based on the old svn:ignore properties.
2011-08-27 09:24:07 -07:00
Peter Johnson
94ab1135a3 Remove $Id$ and RCSID() usage.
These are useless now that we're using git.
2011-08-19 10:43:16 -07:00
Peter Johnson
502eebd339 Fix const warning in elf_machine_ssym usage.
Reported by: Pierre Muller

[#237 state:resolved]
2011-08-19 10:21:10 -07:00
Peter Johnson
d8d1a5ad90 win64-except.c: Fix incorrect dereference.
Reported by: Pierre Muller

[#236 state:resolved]
2011-08-19 10:14:31 -07:00
Peter Johnson
a9b943e5db file.h: Separate conditional inclusion of direct.h.
This fixes builds on mingw64.

Reported by: Pierre Muller

[#235 state:resolved]
2011-08-19 10:14:14 -07:00
Peter Johnson
40da5cb2c7 dwarf: Fix uninitialized structure member.
dwarf2_loc.discriminator wasn't being initialized by
dwarf2_generate_line_section, leading to incorrect output, including
intermittent test failures in gen64/dwarf64_pathname.
2011-07-11 00:15:30 -07:00
Peter Johnson
bd8401d538 expr_simplify_identity: Pass int_term via pointer.
This allows signaling to the caller (expr_level_op) that the int_term
was destroyed.  Without this, the new expr-simplify-identity testcase
has a use-after-free.

[#232 state:resolved]
2011-07-10 23:44:18 -07:00
Peter Johnson
3b65acb39d Fix VGATHER/VPGATHER memory sizes.
These now match the memory fetch sizes in the AVX reference.

Reported by: nasm64developer
2011-07-04 11:35:19 -07:00
Peter Johnson
ab721f347d Add AVX2 VGATHER* and VPGATHER* instructions.
These instructions use "VSIB" encoding, which takes the place of the
usual SIB encoding.  Several tests cover various legal and illegal
modes.

Last part of [#227 state:resolved].
2011-07-03 19:54:45 -07:00
Peter Johnson
d779fcb04e Add most Intel AVX2 instructions.
Reference: http://www.intel.com/software/avx rev11 spec

This is all AVX2 instructions except for VGATHER*/VPGATHER*, which
require additional ModRM handling.

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

Part of [#227].
2011-07-03 14:36:37 -07:00
Peter Johnson
fc7724a3df pmovmskb/vpmovmskb: default operand size is 64 bits. 2011-07-03 12:48:46 -07:00
Peter Johnson
47f693fd89 Add Intel BMI1, BMI2, INVPCID, LZCNT instructions.
Reference: http://www.intel.com/software/avx rev11 spec

Also add appropriate CPU bits and directive handling for these.

Currently we have no good way of handling an "or" of instruction bits
(in this case needed for LZCNT, where it's either AMD or LZCNT).  For
now, make it LZCNT only.

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

Part of [#227].
2011-07-03 01:48:44 -07:00
Peter Johnson
0614dede9b x86/gas: Fix no-suffix push and pop.
Previously plain "push" and "pop" would always generate a 16-bit pop
(for effective address versions).

Reported by: Alexei Svitkine

[#212 state:resolved]
2011-07-02 17:11:10 -07:00
Peter Johnson
f12d030f90 Add test for 64-bit shr/shl. 2011-07-02 16:28:29 -07:00
Peter Johnson
5d5ad1d91c Allow 64-bit LFS/LGS/LSS.
[#229 state:resolved]
2011-06-27 23:48:28 -07:00
Peter Johnson
de38127f1c Fix "times" relocation handling.
Previously a line such as "times 4 mov rax, [rel foobar]" would result
in incorrect relocations being generated.

Patch by: bird-yasm@anduin.net

[#211 state:resolved]
2011-06-25 23:32:22 -07:00
Peter Johnson
ac59d2353b Fix cython.m4 for beta versions of Cython.
[#204 state:resolved]
2011-06-25 15:09:03 -07:00
Peter Johnson
2f6162a0ae Fix build with recent Cython.
[#216 state:resolved]
2011-06-25 14:58:27 -07:00
Peter Johnson
19d85dfe84 Fix #263: Add quotes to yasm.rules switches. 2011-06-20 23:32:27 -07:00
Peter Johnson
b96cc7d9b2 Fix escaping at end of gas string constant.
Patch by: Daniel Diaz <Daniel.Diaz@univ-paris1.fr>
2011-05-29 15:29:15 -07:00