Peter Johnson [Sat, 20 Oct 2012 00:23:26 +0000 (17:23 -0700)]
Add support for "function" decorator in win32/win64.
This can be used on global directives (e.g. global _foo:function) to
indicate the global is a function. This is useful for incremental
linking in MSVC.
sergey semenko [Mon, 27 Feb 2012 10:07:03 +0000 (12:07 +0200)]
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.
Peter Johnson [Mon, 31 Oct 2011 06:50:31 +0000 (23:50 -0700)]
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)
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 */
~~~ ^~~
Peter Johnson [Sat, 27 Aug 2011 16:25:30 +0000 (09:25 -0700)]
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.
Peter Johnson [Mon, 11 Jul 2011 07:15:30 +0000 (00:15 -0700)]
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.
Peter Johnson [Mon, 11 Jul 2011 06:44:18 +0000 (23:44 -0700)]
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.
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>
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.
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
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.