Commit graph

1796 commits

Author SHA1 Message Date
Peter Johnson
d295713e21 Bump version numbers for release.
svn path=/tags/yasm-0.7.1/; revision=2094
2008-05-15 01:38:46 +00:00
Peter Johnson
81f12a1830 Merge [2088] from trunk (Add westmere CPU).
svn path=/branches/yasm-0.7.x/; revision=2092
2008-05-14 03:46:41 +00:00
Peter Johnson
464cbc852b Merge [2077] from trunk (LAR and LSL should be 286+Prot, not 386).
svn path=/branches/yasm-0.7.x/; revision=2091
2008-05-14 03:44:53 +00:00
Peter Johnson
0fdda0e00e Merge [2074] from trunk.
svn path=/branches/yasm-0.7.x/; revision=2090
2008-05-14 03:43:20 +00:00
Peter Johnson
1ed090be23 Merge [2069], [2070], [2071], and [2072] from trunk to 0.7.x branch.
svn path=/branches/yasm-0.7.x/; revision=2073
2008-04-25 03:25:12 +00:00
Peter Johnson
01ef04cee1 Bump 0.7.x branch version to 0.7.1.
svn path=/branches/yasm-0.7.x/; revision=2068
2008-04-16 03:41:03 +00:00
Peter Johnson
44f902939d Merge [2063] and [2064] from trunk.
svn path=/branches/yasm-0.7.x/; revision=2065
2008-04-15 02:53:18 +00:00
Peter Johnson
2d36cf72ae Allow {extern symbol}-{symbol in same segment} transformation.
This was earlier limited to local symbols.

Reported by: Dave Lee <davelee.com@gmail.com>

svn path=/trunk/yasm/; revision=2064
2008-04-14 01:48:02 +00:00
Peter Johnson
180d18bc11 Allow underscores in the middle of binary, octal, and hex constants.
This makes things like 00_11_22_33h okay.
Allow 0X as well as 0x in directives (already allowed for normal case).

svn path=/trunk/yasm/; revision=2063
2008-04-12 08:30:22 +00:00
Peter Johnson
7ee0aa7316 Merge [2061] from trunk.
svn path=/branches/yasm-0.7.x/; revision=2062
2008-04-12 01:34:30 +00:00
Peter Johnson
ae63705e56 Add YMM register group for GAS mode.
svn path=/trunk/yasm/; revision=2061
2008-04-12 01:33:54 +00:00
Peter Johnson
ea23c1e2b9 Merge [2058] and [2059] from trunk.
svn path=/branches/yasm-0.7.x/; revision=2060
2008-04-12 01:18:02 +00:00
Peter Johnson
ef8479870e Update copyright dates.
svn path=/trunk/yasm/; revision=2059
2008-04-12 01:17:00 +00:00
Peter Johnson
73ce31d01d We no longer need bison, but we do need Python for building from SVN.
svn path=/trunk/yasm/; revision=2058
2008-04-12 01:16:04 +00:00
Peter Johnson
b2d86721c8 Bump branch version to 0.7.x, with an internal version of 0.7.0.
svn path=/branches/yasm-0.7.x/; revision=2057
2008-04-12 01:10:36 +00:00
Peter Johnson
b3ebcde8c7 Merge [2055] from trunk.
svn path=/branches/yasm-0.7.x/; revision=2056
2008-04-12 01:09:37 +00:00
Peter Johnson
76e18e1aab Remove snapshot version number accidentally committed with Mkfiles.
svn path=/trunk/yasm/; revision=2055
2008-04-12 01:08:19 +00:00
Peter Johnson
07020fa4b7 Bump trunk version after 0.7.x branch.
svn path=/trunk/yasm/; revision=2054
2008-04-12 01:04:29 +00:00
Peter Johnson
97a96c648d Disable Python bindings by default; the build process for them is broken
on most non-32-bit systems.

svn path=/trunk/yasm/; revision=2052
2008-04-12 00:56:30 +00:00
Peter Johnson
a38f103515 Add complete Intel Advanced Vector Extensions (AVX) support.
A full testcase for NASM mode based on the AVX programming reference is
included.  GAS mode should work, but is untested at present.

V-prefix aliases are present for all supported instructions to allow easy
use of the VEX prefix version without significant code modifications.

All comparison and other pseudo-ops are included.

svn path=/trunk/yasm/; revision=2051
2008-04-11 09:29:58 +00:00
Peter Johnson
9ade4d408d Move BITS==64 condition out of the CPU field (where it really doesn't belong)
and into a new misc_flags field.  This doesn't take any more space,
simplifies the code, and allows adding additional conditions like this in
the future.

Found and fixed a bug in CPU field generation (not copying a set variable
in gen_x86_insn.py).

svn path=/trunk/yasm/; revision=2050
2008-04-11 01:37:46 +00:00
Peter Johnson
120c28e2d3 PCOMUcc should have been PCOMccU.
Fix up condition code naming and add aliases to match SSE5 added to GNU
binutils as follows:
 COMcc:
 - swapped uneq, unlt, and unle with neq, nlt, and nle
 - added unge, ungt, ne, uge, ugt, nge, ngt, une, ge, and gt aliases
 PCOMcc:
 - added ne alias (for neq)

svn path=/trunk/yasm/; revision=2049
2008-04-04 02:10:24 +00:00
Peter Johnson
33cc7a0255 Add mnenomic condition codes for SSE5 comparison opcodes.
There are 16 condition codes for COM and 8 condition codes for PCOM/PCOMU.

Noticed by: nasm64developer@users.sf.net

svn path=/trunk/yasm/; revision=2048
2008-04-03 06:45:49 +00:00
Peter Johnson
33746edaa4 Minor update of VC9 compile readme.
Also add conversion script from vc9 (2008) build files to vc8 (2005) build
files.

Contributed by: Brian Gladman <brg@gladman.plus.com>

svn path=/trunk/yasm/; revision=2047
2008-04-01 04:25:15 +00:00
Peter Johnson
211072d520 Include VC9 build files in the distfile.
Noticed by: Brian Gladman <brg@gladman.plus.com>

svn path=/trunk/yasm/; revision=2046
2008-03-28 02:42:41 +00:00
Peter Johnson
698f3fe8ff Fix #136: Unbreak ..@ non-local-label mechanism.
Add testcase for this.
Also fix $-prefixed labels to match non-$-prefixed label behavior
(this has been broken for a very long time).

svn path=/trunk/yasm/; revision=2045
2008-03-27 05:35:36 +00:00
Peter Johnson
31b0b9294c Fix CPU feature bit number for XSAVE.
svn path=/trunk/yasm/; revision=2043
2008-02-22 04:50:32 +00:00
Peter Johnson
11ca8fd324 Add support for Nehalem XSAVE instructions and CPU feature.
svn path=/trunk/yasm/; revision=2042
2008-02-22 04:48:56 +00:00
Peter Johnson
6ced647e97 Allow setting of the TLS section flag in the NASM section directive.
Also default the .tdata section to having the TLS flag set.

svn path=/trunk/yasm/; revision=2041
2008-02-21 09:00:46 +00:00
Peter Johnson
b49c080965 Set ELF symbol type to TLS if either:
- symbol is defined in a TLS section
- symbol is used in a TLS relocation

This is required by the GNU linker, and matches GNU as behavior.
The implementation is not as clean as it perhaps should be, but it does
the job.

Reported by: Nils Weller <nils@gnulinux.nl>

svn path=/trunk/yasm/; revision=2040
2008-02-21 08:57:23 +00:00
Peter Johnson
40a06385d5 Pass size directly to yasm_value_finalize_expr() rather than setting
afterwards.  This fixes the value full-mask case for immediate operands:
e.g. "mov ax, word (label & 0xffff)".

svn path=/trunk/yasm/; revision=2039
2008-02-15 06:06:57 +00:00
Peter Johnson
7991cd8309 Fix #134: Allow '@' as the first character of an identifier, like NASM does.
svn path=/trunk/yasm/; revision=2038
2008-02-15 05:25:47 +00:00
Peter Johnson
fea08b7307 Update ..sym to work within new get_special_sym() framework.
svn path=/trunk/yasm/; revision=2037
2008-02-09 04:09:47 +00:00
Peter Johnson
a3e30bc39f Add support for ELF32 and ELF64 TLS (thread local storage) relocations.
While here, simplify how special relocations are handled inside ELF.

Requested by: Nils Weller <nils@gnulinux.nl>

svn path=/trunk/yasm/; revision=2036
2008-02-09 04:06:47 +00:00
Peter Johnson
04039380d1 Enable use of sym@FOO constructs in GAS parser.
To do this, restructure how special symbols are handled between the parser
and object format.  Instead of creating special symbols with the right
names, instead have the parser call the object format to see if a match
is found into the special symbols, which are no longer stored in the
symbol table.

svn path=/trunk/yasm/; revision=2035
2008-02-09 03:35:07 +00:00
Peter Johnson
aba2a018cb Support masking of relocatable values with an AND of the full value width to
avoid warnings.  This is primarily useful in bin object format output.
  db label        ; if label is >255, warns.
  db label & 0xff ; okay, no warning.
Masks other than full-sized 1s are still not supported:
  db label & 0x7f ; too complex error

svn path=/trunk/yasm/; revision=2034
2008-02-08 18:59:46 +00:00
Peter Johnson
0beb32cda9 Eliminate conversion warnings due to int/size_t differences.
svn path=/trunk/yasm/; revision=2033
2008-02-08 18:49:10 +00:00
Peter Johnson
0fba7dca8d Fix #130: Add SAFESEH directive for indicating SEH handlers in win32 output.
Unlike in MASM, no command-line switch is required.
Usage:
  extern handler (or handler: to define locally)
  safeseh handler

svn path=/trunk/yasm/; revision=2032
2008-02-08 18:26:40 +00:00
Peter Johnson
2fe53b2c29 Revert r2029. According to both AMD64 and Intel 64 instruction set
references, REX + 90h opcode is not NOP, but a valid XCHG:

"The x86 architecture commonly uses the XCHG EAX, EAX instruction (opcode
90h) as a one-byte NOP. In 64-bit mode, the processor treats opcode 90h as
a true NOP only if it would exchange rAX with itself. Without this special
handling, the instruction would zero-extend the upper 32 bits of RAX, and
thus it would not be a true nooperation.  Opcode 90h can still be used to
exchange rAX and r8 if the appropriate REX prefix is used."

Noticed by: nasm64developer@users.sf.net

svn path=/trunk/yasm/; revision=2031
2008-02-02 19:23:17 +00:00
Peter Johnson
e03b37ca5d Add Visual Studio 2008 build files.
Contributed by: Brian Gladman <brg@gladman.plus.com>

svn path=/trunk/yasm/; revision=2030
2008-01-31 02:25:12 +00:00
Peter Johnson
e212c41320 Don't generate 0x90 opcode for xchg rax, r8 and varieties thereof.
Without this fix, "xchg eax, r8d" results in 41 90, which is an invalid
opcode.

Reported by: Stefan <SMarF@gmx.de>

svn path=/trunk/yasm/; revision=2029
2008-01-28 05:48:26 +00:00
Peter Johnson
d1b8736d7a Make jmp with seg:off equ behave the same as NASM.
Formerly:
  foo equ 1:2
  jmp foo
would result in a far jump.  Now, an explicit "far" is required:
  jmp far foo
to generate a far jump.

In addition, the direct use of seg:off in immediates and effective
addresses will result in an error; the use of EQU'ed seg:off values
is still legal (and will still result in just the offset).  This
behavior is more sane and also matches NASM behavior.
Thus:
  foo equ 1:2
  mov ax, foo   ; okay, just 2
  mov ax, [foo] ; okay, just 2
  mov ax, 1:2   ; illegal
  mov ax, [1:2] ; illegal

svn path=/trunk/yasm/; revision=2028
2008-01-19 08:59:19 +00:00
Peter Johnson
e1f577f6d2 tools/xdf: Make 64-bit safe.
svn path=/trunk/yasm/; revision=2027
2008-01-19 08:30:21 +00:00
Peter Johnson
0e0d4b413a Fix #129: Support no-operand form of movsd in GAS syntax.
Reported and patch by: mm.beck@gmx.net

svn path=/trunk/yasm/; revision=2026
2008-01-03 04:13:18 +00:00
Peter Johnson
f210b61533 re2c: Fix -b generation in certain cases.
Fix from re2c repo r417 (sourceforge bug 1479044).

svn path=/trunk/yasm/; revision=2025
2007-12-15 00:00:55 +00:00
Peter Johnson
8370e6efa9 Fix NULL dereference for certain cases of REX used with jump instruction.
svn path=/trunk/yasm/; revision=2024
2007-12-10 05:20:32 +00:00
Peter Johnson
95ccef9731 Check for 0-termination character rather than newline.
svn path=/trunk/yasm/; revision=2023
2007-12-07 06:49:24 +00:00
Peter Johnson
ad072d5172 Turn off -Wconversion. It is far too noisy for it to be useful due to
"passing arg X of `' with different width due to prototype" warnings.

svn path=/trunk/yasm/; revision=2022
2007-12-06 05:46:02 +00:00
Peter Johnson
de93025047 Fix #122: Allow standalone prefixes.
Implementation copied from gas parser.

svn path=/trunk/yasm/; revision=2021
2007-12-04 07:08:01 +00:00
Peter Johnson
4606b9506a Fix #125: Improve reporting of operand and expression syntax errors.
Now instead of the generic "expression syntax error", more informative
error messages such as the following are reported:
 - unexpected `:' after instruction
 - expected expression after `%'
 - expected operand, got `%'

svn path=/trunk/yasm/; revision=2020
2007-12-04 06:55:11 +00:00