platform/upstream/nasm.git
11 years agoeval: Use is_power2 helper instead of open code
Cyrill Gorcunov [Sun, 17 Feb 2013 21:38:11 +0000 (01:38 +0400)]
eval: Use is_power2 helper instead of open code

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
11 years agomake: Don't forget to generate manpage for all target
Cyrill Gorcunov [Sun, 17 Feb 2013 21:31:59 +0000 (01:31 +0400)]
make: Don't forget to generate manpage for all target

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
11 years agoman: Generate manpages from asciidoc format
Cyrill Gorcunov [Sun, 17 Feb 2013 18:50:19 +0000 (22:50 +0400)]
man: Generate manpages from asciidoc format

The asciidoc format is a way more easier to read
by a human.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
11 years agoUpdate .gitignore
Cyrill Gorcunov [Sun, 17 Feb 2013 18:47:28 +0000 (22:47 +0400)]
Update .gitignore

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
11 years agonasm.c: Convert GET_CURR_OFFS/SET_CURR_OFFS to functions
Cyrill Gorcunov [Fri, 15 Feb 2013 08:35:04 +0000 (12:35 +0400)]
nasm.c: Convert GET_CURR_OFFS/SET_CURR_OFFS to functions

In future better to not work with global variables but
rather pass arguments.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
11 years agonasm.c: Update year in header
Cyrill Gorcunov [Fri, 15 Feb 2013 08:25:33 +0000 (12:25 +0400)]
nasm.c: Update year in header

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
11 years agonasm.c: Tabs to spaces in emit_dependencies
Cyrill Gorcunov [Fri, 15 Feb 2013 08:25:04 +0000 (12:25 +0400)]
nasm.c: Tabs to spaces in emit_dependencies

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
11 years agonasm.c: Tabs to spaces in main
Cyrill Gorcunov [Fri, 15 Feb 2013 08:24:11 +0000 (12:24 +0400)]
nasm.c: Tabs to spaces in main

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
11 years agonasm.c: Tabs to spaces in copy_filename
Cyrill Gorcunov [Fri, 15 Feb 2013 08:22:59 +0000 (12:22 +0400)]
nasm.c: Tabs to spaces in copy_filename

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
11 years agonasm.c: Tabs to spaces in copy_filename
Cyrill Gorcunov [Fri, 15 Feb 2013 08:22:27 +0000 (12:22 +0400)]
nasm.c: Tabs to spaces in copy_filename

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
11 years agonasm.c: Tabs to spaces in process_arg
Cyrill Gorcunov [Fri, 15 Feb 2013 08:20:58 +0000 (12:20 +0400)]
nasm.c: Tabs to spaces in process_arg

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
11 years agonasm.c: Tabs to spaces in process_response_file
Cyrill Gorcunov [Fri, 15 Feb 2013 08:14:06 +0000 (12:14 +0400)]
nasm.c: Tabs to spaces in process_response_file

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
11 years agonasm.c: Tabs to spaces in assemble_file
Cyrill Gorcunov [Fri, 15 Feb 2013 08:13:09 +0000 (12:13 +0400)]
nasm.c: Tabs to spaces in assemble_file

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
11 years agonasm.c: Tabs to spaces in nasm_verror_gnu
Cyrill Gorcunov [Thu, 14 Feb 2013 22:21:07 +0000 (02:21 +0400)]
nasm.c: Tabs to spaces in nasm_verror_gnu

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
11 years agonasm.c: Tabs to spaces in nasm_verror_common
Cyrill Gorcunov [Thu, 14 Feb 2013 22:20:26 +0000 (02:20 +0400)]
nasm.c: Tabs to spaces in nasm_verror_common

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
11 years agonasm.c: Tabs to spaces in define_macros_early
Cyrill Gorcunov [Thu, 14 Feb 2013 22:16:58 +0000 (02:16 +0400)]
nasm.c: Tabs to spaces in define_macros_early

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
11 years agoDrop trailing space from directive.pl
Cyrill Gorcunov [Thu, 14 Feb 2013 22:09:16 +0000 (02:09 +0400)]
Drop trailing space from directive.pl

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
11 years agoAlign enum prefixes members
Cyrill Gorcunov [Thu, 14 Feb 2013 22:06:24 +0000 (02:06 +0400)]
Align enum prefixes members

It's a way easier to read.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
11 years agoBR3392240: preproc: Don't fail on pasting of space expanded rvalue tokens
Cyrill Gorcunov [Sun, 3 Feb 2013 21:24:54 +0000 (01:24 +0400)]
BR3392240: preproc: Don't fail on pasting of space expanded rvalue tokens

Reported-by: KO Myung-Hun <komh@chollian.net>
Tested-by: KO Myung-Hun <komh@chollian.net>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
11 years agoNASM 2.10.07
Cyrill Gorcunov [Wed, 2 Jan 2013 08:42:01 +0000 (12:42 +0400)]
NASM 2.10.07

11 years agodocs: Update changes
Cyrill Gorcunov [Thu, 27 Dec 2012 16:28:02 +0000 (20:28 +0400)]
docs: Update changes

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
11 years agobr3392236: Don't treat \Space after \BackSlash as a sign for line continuation
Cyrill Gorcunov [Thu, 27 Dec 2012 16:02:17 +0000 (20:02 +0400)]
br3392236: Don't treat \Space after \BackSlash as a sign for line continuation

In commit f1fe4fdeabeaf2e5e4d02ef43beeb09a6fbfed1b I occasionally
made a \Space after \BackSlash being a sign of line continuation.

Fix it.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
11 years agoNASM 2.10.06
H. Peter Anvin [Tue, 4 Dec 2012 21:38:36 +0000 (13:38 -0800)]
NASM 2.10.06

11 years agochanges: document fix of macho64
H. Peter Anvin [Tue, 4 Dec 2012 21:36:42 +0000 (13:36 -0800)]
changes: document fix of macho64

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
11 years agoBR3392232: Fix relocations in MachO64
Keith Kanios [Wed, 28 Nov 2012 16:05:20 +0000 (20:05 +0400)]
BR3392232: Fix relocations in MachO64

Signed-off-by: Keith Kanios <keith@kanios.net>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
12 years agooutput: Add more Elf unification
Cyrill Gorcunov [Fri, 16 Nov 2012 18:57:07 +0000 (22:57 +0400)]
output: Add more Elf unification

One day the elf output routines would be abstracted
enough to be merged in one file. This patch simply
removes some differences from elf32/64 code.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
12 years agoBR3392231: Fix get_closest_section_symbol_by_offset
Cyrill Gorcunov [Mon, 5 Nov 2012 20:47:20 +0000 (00:47 +0400)]
BR3392231: Fix get_closest_section_symbol_by_offset

This patch changes get_closest_section_symbol_by_offset
logic to lookup only the closest symbols which are at
or before the supplied offset.

Signed-off-by: Keith Kanios <keith@kanios.net>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
12 years agoBR3392226 preproc: Rework line readin procedure
Cyrill Gorcunov [Sat, 27 Oct 2012 15:27:18 +0000 (19:27 +0400)]
BR3392226 preproc: Rework line readin procedure

It's been reported that we handle MacOS eol wrong.
This patch fixes the problem.

http://bugzilla.nasm.us/show_bug.cgi?id=3392226

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
12 years agodoc/changes.src: Update to include recent changes.
H. Peter Anvin [Mon, 8 Oct 2012 04:05:59 +0000 (12:05 +0800)]
doc/changes.src: Update to include recent changes.

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
12 years agoBR 3327107: fix assembly of VPCMPGTQ
Marat Dukhan [Mon, 8 Oct 2012 04:02:34 +0000 (12:02 +0800)]
BR 3327107: fix assembly of VPCMPGTQ

Fix incorrect instruction encoding for VPCMPGTQ.

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
12 years agoinsns.dat: Mark the immediate for shift instructions as imm8
H. Peter Anvin [Wed, 26 Sep 2012 05:51:40 +0000 (22:51 -0700)]
insns.dat: Mark the immediate for shift instructions as imm8

Allow the form:

      mov <rm>,byte 1

... to generate the explicit byte form.  An unfortunate side effect is
that disassembly is ugly; this could be fixed by making a special byte
code that acts the same for the assembler but disassembles specially.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
12 years agoBR 3392227: Remove SB flag from SHIFT rm,imm
H. Peter Anvin [Wed, 26 Sep 2012 05:45:35 +0000 (22:45 -0700)]
BR 3392227: Remove SB flag from SHIFT rm,imm

Remove the SB flag from the rm,imm forms of the shift/rotate
instructions; presumably the intent was to mark the immediate as a
byte immediate, but it instead caused the memory operand to be
accepted without a size, but generate the incorrect code as a result.

Note: it would be good to modify the UNITY filter so that the explicit
form:

shl eax,byte 1

... forces the imm form rather than the ,1 form.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
12 years agoopflags: Rework opflags bits with OP_ macros
Cyrill Gorcunov [Sat, 15 Sep 2012 16:01:32 +0000 (20:01 +0400)]
opflags: Rework opflags bits with OP_ macros

In this path the opflags bits are completely reworked
in a sake of simplier extension. Inparticular for Knights
Corener instructions we will need new registers and new
sizes.

What's done

 - all bits are grouped in sequences, and start using OP_
   macros, thus if one need to extend some field -- just
   tune up @shift and @bits where needed

 - the #define we use in code are OR'ed in symbols, this
   should be a way more convenient to deal with instead of
   pure hex numbers.

The tests are passed but more eyes needed to review this
rather big and intrusive patch. The reason why it's done
in one single path -- for revertability in one command.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
12 years agoopflags: Introduce opflags generating macros
Cyrill Gorcunov [Sat, 15 Sep 2012 15:58:36 +0000 (19:58 +0400)]
opflags: Introduce opflags generating macros

This patch introduces two macros

 - OP_GENMASK, to generate masks in opflags
 - OP_GENBIT, to generate bit at specified position

we will use them with extended 64 bits opflags.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
12 years agoopflags: Drop never used REG_RIP/REG_EIP
Cyrill Gorcunov [Sat, 15 Sep 2012 12:52:32 +0000 (16:52 +0400)]
opflags: Drop never used REG_RIP/REG_EIP

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
12 years agoWhen generate dependency names internally, quote filenames
H. Peter Anvin [Mon, 10 Sep 2012 00:09:00 +0000 (17:09 -0700)]
When generate dependency names internally, quote filenames

Quote filenames for Make when generated for filenames internally.
Only skip quoting when using the -MT option (rather than -MQ).

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
12 years agochanges.src: fix grammar error (support -> supports)
H. Peter Anvin [Sun, 9 Sep 2012 23:30:07 +0000 (16:30 -0700)]
changes.src: fix grammar error (support -> supports)

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
12 years agoopflags: Extend opflags_t to 64 bits
Cyrill Gorcunov [Sun, 9 Sep 2012 20:19:12 +0000 (00:19 +0400)]
opflags: Extend opflags_t to 64 bits

Soon we will need to encode 512 bits values
thus there is no space left in our opflags_t
which is 32 bitfield.

Extend it to 64 bits width.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
12 years agoNASM 2.10.05
H. Peter Anvin [Sun, 9 Sep 2012 20:21:11 +0000 (13:21 -0700)]
NASM 2.10.05

12 years agochanges.src: Document CLAC/STAC
H. Peter Anvin [Sun, 9 Sep 2012 18:05:35 +0000 (11:05 -0700)]
changes.src: Document CLAC/STAC

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
12 years agoAdd CLAC and STAC instructions from AVX spec 014 (319433-014)
H. Peter Anvin [Sun, 9 Sep 2012 18:03:12 +0000 (11:03 -0700)]
Add CLAC and STAC instructions from AVX spec 014 (319433-014)

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
12 years agoNASM 2.10.04
H. Peter Anvin [Sat, 18 Aug 2012 18:02:19 +0000 (11:02 -0700)]
NASM 2.10.04

12 years agochanges.src: List of changes for the next release
H. Peter Anvin [Fri, 17 Aug 2012 22:42:24 +0000 (15:42 -0700)]
changes.src: List of changes for the next release

Prepare a list of changes for a 2.10.04 release.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
12 years agoAdd back the 256-bit form of the VORPD instruction
H. Peter Anvin [Fri, 17 Aug 2012 22:41:34 +0000 (15:41 -0700)]
Add back the 256-bit form of the VORPD instruction

The 256-bit form of the VORPD instruction was deleted in checkin
89a38dac363c45d5309001a710f8cf44e7833f81, apparently by mistake.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
12 years agoBR 3392207: preproc: Rewrite paste_tokens routine
Cyrill Gorcunov [Sat, 4 Aug 2012 06:51:58 +0000 (10:51 +0400)]
BR 3392207: preproc: Rewrite paste_tokens routine

This should make it easier to read and moreover
now we're able to preprocess pasting as

%define N 1e%++%+ 5
dd N, 1e+5

Note that N should be expanded as series of pasting
to 1e+5 term, but before this patch we were ending
up in 1e+%+ 5 which is wrong.

In other words the fixed version output is

dd 1e+5, 1e+5

while broken one was

dd 1e+%+ 5, 1e+5

This patch also fixes nil dereferences in case if
there is no left or right token around pasting term.

http://bugzilla.nasm.us/show_bug.cgi?id=3392207

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
12 years agoBR 3392218: Disassemble 82h opcodes
H. Peter Anvin [Sat, 28 Jul 2012 22:28:48 +0000 (15:28 -0700)]
BR 3392218: Disassemble 82h opcodes

The 82h opcodes are undocumented aliases for the 80h opcodes, except
in 64-bit mode.  We don't generate them, but let the disassembler
handle them correctly.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
12 years agoNASM 2.10.03
H. Peter Anvin [Mon, 23 Jul 2012 04:09:20 +0000 (21:09 -0700)]
NASM 2.10.03

12 years agodoc: document XRELEASE MOV fix
H. Peter Anvin [Mon, 23 Jul 2012 04:08:30 +0000 (21:08 -0700)]
doc: document XRELEASE MOV fix

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
12 years agohle: opcode A2 forbidden with HLE prefixes
H. Peter Anvin [Mon, 23 Jul 2012 04:04:20 +0000 (21:04 -0700)]
hle: opcode A2 forbidden with HLE prefixes

The moffset opcodes A2 and A3 do not support HLE.  Unfortunately
checkin

fb3f4e6d HLE: Change NOHLE to be an instruction flag

... inadvertently lost the NOHLE flag for opcode A2.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
12 years agoNASM 2.10.02
H. Peter Anvin [Sat, 21 Jul 2012 00:55:37 +0000 (17:55 -0700)]
NASM 2.10.02

12 years agochanges: add changes since 2.10.01
H. Peter Anvin [Sat, 21 Jul 2012 00:53:55 +0000 (17:53 -0700)]
changes: add changes since 2.10.01

ilog2*() and new instructions.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
12 years agodoc: document ifunc()
H. Peter Anvin [Sat, 21 Jul 2012 00:51:57 +0000 (17:51 -0700)]
doc: document ifunc()

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
12 years agoisnsn.dat: add norexw to instructions with only 32- and 64-bit forms
H. Peter Anvin [Sat, 21 Jul 2012 00:15:25 +0000 (17:15 -0700)]
isnsn.dat: add norexw to instructions with only 32- and 64-bit forms

Add norexw to the 32-bit versions of instructions with only 32- and
64-bit forms (66 ignored as a size override.)

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
12 years agoinsns.dat: new instructions from the 013 AVX spec
H. Peter Anvin [Fri, 13 Jul 2012 07:58:20 +0000 (09:58 +0200)]
insns.dat: new instructions from the 013 AVX spec

New instructions (ADCX, ADOX, RDSEED) from the 013 AVX spec
(IntelĀ® Architecture Instruction Set Extensions Programming
Reference).

Note: ADCX in 64-bit mode disassembles incorrectly with a 64-bit
argument.  This still needs to be fixed before a 2.10.02 release.

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
12 years agotest: ilog2() test
H. Peter Anvin [Thu, 31 May 2012 17:28:00 +0000 (10:28 -0700)]
test: ilog2() test

Test for the ilog2 function/macros.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
12 years agoeval: add general support for "integer functions" and add ilog2*()
H. Peter Anvin [Thu, 31 May 2012 17:25:37 +0000 (10:25 -0700)]
eval: add general support for "integer functions" and add ilog2*()

Add general support in the function parser for "integer functions"
(actually implemented as special unary operators, then wrapped in
macros) and implement a family of integer logarithms.  The only
difference is the behavior on a non-power-of-two argument:

ilog2[e] -- throw an error
ilog2w -- throw a warning
ilog2f -- round down to power of 2
ilog2c -- round up to power of 2

This is useful for back-converting from masks to bit values.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
12 years agoNASM 2.10.01
Cyrill Gorcunov [Thu, 24 May 2012 21:00:40 +0000 (01:00 +0400)]
NASM 2.10.01

12 years agodocs: Update changes for 2.10.01
Cyrill Gorcunov [Thu, 24 May 2012 20:58:43 +0000 (00:58 +0400)]
docs: Update changes for 2.10.01

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
12 years agoinsns.dat: Add VPMOVMSKB reg32,ymmreg instruction
Cyrill Gorcunov [Thu, 24 May 2012 19:39:00 +0000 (23:39 +0400)]
insns.dat: Add VPMOVMSKB reg32,ymmreg instruction

Reported-by: Jasper Neumann <sirrida@web.de>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
12 years agopreproc: Move NOP preprocessor into separate file
Cyrill Gorcunov [Mon, 7 May 2012 07:34:27 +0000 (11:34 +0400)]
preproc: Move NOP preprocessor into separate file

No need to carry it in nasm.c, let it be more modular.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
12 years agopreproc: Split get rid of global preproc methods
Cyrill Gorcunov [Sun, 6 May 2012 21:57:55 +0000 (01:57 +0400)]
preproc: Split get rid of global preproc methods

This will allow to hook on updated preprocessor
without breaking existing one.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
12 years agopreproc: Drop never used pp_runtime
Cyrill Gorcunov [Sun, 6 May 2012 16:49:24 +0000 (20:49 +0400)]
preproc: Drop never used pp_runtime

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
12 years agopreproc: Use bsii helper
Cyrill Gorcunov [Tue, 1 May 2012 20:18:56 +0000 (00:18 +0400)]
preproc: Use bsii helper

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
12 years agonasmlib: Shrink idata_bytes
Cyrill Gorcunov [Tue, 1 May 2012 20:09:45 +0000 (00:09 +0400)]
nasmlib: Shrink idata_bytes

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
12 years agophash.sh: Use int() for the size of the hash table
H. Peter Anvin [Mon, 26 Mar 2012 16:25:10 +0000 (09:25 -0700)]
phash.sh: Use int() for the size of the hash table

Pass the hash table size to int() to make it a bit more sane.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
12 years agoNASM 2.10
H. Peter Anvin [Mon, 12 Mar 2012 20:36:02 +0000 (13:36 -0700)]
NASM 2.10

12 years agohelp: Print that -Ox is a default optimization level
Cyrill Gorcunov [Sun, 11 Mar 2012 10:19:17 +0000 (14:19 +0400)]
help: Print that -Ox is a default optimization level

Reported-by: Frank Kotler <fbkotler@myfairpoint.net>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
12 years agopreproc: Finally drop context-through search
Cyrill Gorcunov [Sun, 11 Mar 2012 07:38:47 +0000 (11:38 +0400)]
preproc: Finally drop context-through search

[backport 290eac75699fb768fdea4588772cf08b5db2788c]

2.09 series was the last one we support context-thru search
(and we were issuing a warning about that) so drop all-context
from get_ctx() routine.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
12 years agoNASM 2.10rc15
H. Peter Anvin [Sat, 10 Mar 2012 00:43:37 +0000 (16:43 -0800)]
NASM 2.10rc15

12 years agotest: Add br3385573 testcase
Cyrill Gorcunov [Tue, 6 Mar 2012 07:18:02 +0000 (11:18 +0400)]
test: Add br3385573 testcase

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
12 years agoBR3385573: insns: Fix VPMOVSXBW
Cyrill Gorcunov [Tue, 6 Mar 2012 07:12:17 +0000 (11:12 +0400)]
BR3385573: insns: Fix VPMOVSXBW

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
12 years agoTry again to fix our handling of MOVD/MOVQ
H. Peter Anvin [Tue, 6 Mar 2012 06:37:21 +0000 (22:37 -0800)]
Try again to fix our handling of MOVD/MOVQ

Try to implement the handling of MOVD as attempted in checkin:

    70712c0df6c437c50452c4997aa2e3de5a0e0299

and reverted in:

    d279fbbd80aab6f79584249629a4aea90b851458

due to BR3392199.  This time make sure to use the SX flag to only
match when a size is explicitly given, and also don't duplicate the 0F
6F/7F opcodes, which are documented as MOVQ by AMD as well as Intel.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
12 years agoNASM 2.10rc14
H. Peter Anvin [Mon, 5 Mar 2012 03:46:43 +0000 (19:46 -0800)]
NASM 2.10rc14

12 years agoBR3392200: preproc - Fix dangling paste term
Cyrill Gorcunov [Sun, 4 Mar 2012 09:05:55 +0000 (13:05 +0400)]
BR3392200: preproc - Fix dangling paste term

Backport 99a055add917fe954038885d9013f8968f76790c

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
12 years agoNASM 2.10rc13
H. Peter Anvin [Sun, 4 Mar 2012 00:26:07 +0000 (16:26 -0800)]
NASM 2.10rc13

12 years agopreproc: Revert to the NASM 2.09 preprocessor
H. Peter Anvin [Sun, 4 Mar 2012 00:14:51 +0000 (16:14 -0800)]
preproc: Revert to the NASM 2.09 preprocessor

The NASM 2.09 preprocessor allows some illogical constructs, but which
unfortunately has been found in real code in the field.  We need
a compatibility solution or a pragma before we can avoid that.

However, we need the other features in NASM 2.10 to come out, so
revert the preprocessor changes for now.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
12 years agopreproc: Drop never used Cond structure
Cyrill Gorcunov [Wed, 29 Feb 2012 22:17:51 +0000 (02:17 +0400)]
preproc: Drop never used Cond structure

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
12 years agoNASM 2.10rc12
Cyrill Gorcunov [Mon, 27 Feb 2012 07:44:33 +0000 (11:44 +0400)]
NASM 2.10rc12

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
12 years agodoc: Update changes
Cyrill Gorcunov [Mon, 27 Feb 2012 07:29:37 +0000 (11:29 +0400)]
doc: Update changes

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
12 years agoBR3392200: preproc - Fix dangling paste term
Cyrill Gorcunov [Mon, 27 Feb 2012 07:11:33 +0000 (11:11 +0400)]
BR3392200: preproc - Fix dangling paste term

In case if there a production

{tok},{%+},{whitespace}*

the preprocessor does not delete
ending paste+spaces tokens. Fix it.

http://bugzilla.nasm.us/show_bug.cgi?id=3392200

Reported-by: KO Myung-Hun <komh@chollian.net>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
12 years agonasm.spec.in: switch to .xz as the source file
H. Peter Anvin [Sun, 26 Feb 2012 16:19:56 +0000 (08:19 -0800)]
nasm.spec.in: switch to .xz as the source file

Switch the source file to use for the SRPM to the .xz file.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
12 years agomisc/release: do xz compression with -9e
H. Peter Anvin [Sun, 26 Feb 2012 06:49:25 +0000 (22:49 -0800)]
misc/release: do xz compression with -9e

Use the -9e compression level when doing xz compression.  It only
saves a few kilobytes, but since our files are pretty small it doesn't
really take all that much time.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
12 years agoinsns.dat: MOV is not lockable; CMPXCHG16B does not support HLE
H. Peter Anvin [Sun, 26 Feb 2012 06:38:42 +0000 (22:38 -0800)]
insns.dat: MOV is not lockable; CMPXCHG16B does not support HLE

Using a LOCK prefix with MOV is not permitted.
The CMPXCHG16B instruction is not defined to support HLE.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
12 years agoHLE: One more byte code conversion
H. Peter Anvin [Sun, 26 Feb 2012 06:35:19 +0000 (22:35 -0800)]
HLE: One more byte code conversion

Add missing site for the \265..267 -> \271..273 byte code move.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
12 years agoHLE: Move byte codes back to \271-\273
H. Peter Anvin [Sun, 26 Feb 2012 06:33:46 +0000 (22:33 -0800)]
HLE: Move byte codes back to \271-\273

Since we are back to three bytecodes, move them back to the \271-\273
slot to free up the \264 complete quad.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
12 years agoNASM 2.10rc11
H. Peter Anvin [Sun, 26 Feb 2012 06:23:32 +0000 (22:23 -0800)]
NASM 2.10rc11

12 years agoHLE: Change NOHLE to be an instruction flag
H. Peter Anvin [Sun, 26 Feb 2012 06:22:07 +0000 (22:22 -0800)]
HLE: Change NOHLE to be an instruction flag

The way our matching system works we have to make NOHLE an instruction
flag rather than an byte code; by the time we run the byte code
interpreter we have already picked an instruction pattern once and for
all.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
12 years agotag-release: actually push data out unless --no-push is given
H. Peter Anvin [Sun, 26 Feb 2012 06:02:08 +0000 (22:02 -0800)]
tag-release: actually push data out unless --no-push is given

Rather than just printing a list of commands, do them, unless
--no-push is given...

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
12 years agoNASM 2.10rc10
H. Peter Anvin [Sun, 26 Feb 2012 05:59:36 +0000 (21:59 -0800)]
NASM 2.10rc10

12 years agorelease: create .xz files; remove empty subdirectories
H. Peter Anvin [Sun, 26 Feb 2012 05:28:15 +0000 (21:28 -0800)]
release: create .xz files; remove empty subdirectories

Create .xz files as well as .gz and .bz2; remove empty subdirectories
from the xdoc archives.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
12 years agodoc: Remove some ugliness from the win64 section
H. Peter Anvin [Sat, 25 Feb 2012 23:50:32 +0000 (15:50 -0800)]
doc: Remove some ugliness from the win64 section

Clean up the formatting of the Win64 examples.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
12 years agopsfonts.ph: increase leading to font size+20%
H. Peter Anvin [Sat, 25 Feb 2012 23:46:38 +0000 (15:46 -0800)]
psfonts.ph: increase leading to font size+20%

Increase the leading from +10% to +20%, (12 pt leading for the 10 pt
bulk text.)

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
12 years agochanges: document bigendian UTF-16/UTF-32 support
H. Peter Anvin [Sat, 25 Feb 2012 23:34:14 +0000 (15:34 -0800)]
changes: document bigendian UTF-16/UTF-32 support

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
12 years agoAdd support for UTF-16BE and UTF-32BE
H. Peter Anvin [Sat, 25 Feb 2012 23:29:37 +0000 (15:29 -0800)]
Add support for UTF-16BE and UTF-32BE

Add support for bigendian UTF-16 and UTF-32, and (for symmetry) add
explicitly littleendian operators.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
12 years agoMake the LOCK and HLE warnings suppressable.
H. Peter Anvin [Sat, 25 Feb 2012 23:10:04 +0000 (15:10 -0800)]
Make the LOCK and HLE warnings suppressable.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
12 years agodoc: Document elfx32 support
H. Peter Anvin [Sat, 25 Feb 2012 23:05:45 +0000 (15:05 -0800)]
doc: Document elfx32 support

Document the new elfx32 backend.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
12 years agodoc: Move the EPS logo down by 1"
H. Peter Anvin [Sat, 25 Feb 2012 22:55:12 +0000 (14:55 -0800)]
doc: Move the EPS logo down by 1"

The default page-centered position doesn't work too well with the
title and the new logo, so move the new logo down the page a bit.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
12 years agodoc: New NASM logo
Cyrill Gorcunov [Sat, 25 Feb 2012 22:53:34 +0000 (14:53 -0800)]
doc: New NASM logo

Update to a new NASM logo.

12 years agodoc: Allow repositioning the EPS logo
H. Peter Anvin [Sat, 25 Feb 2012 22:51:01 +0000 (14:51 -0800)]
doc: Allow repositioning the EPS logo

Allow specifying an offset from the computed position of the EPS logo:

\M{logoxadj}{adjustment}
\M{logoyadj}{adjustment}

The adjustment is given in Postscript points (1/72" = 0.352778 mm) and
using the Postscript coordinate system, with the origin in the lower
left.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
12 years agoUpdate copyright year to 2012
H. Peter Anvin [Sat, 25 Feb 2012 22:45:44 +0000 (14:45 -0800)]
Update copyright year to 2012