platform/upstream/nasm.git
10 years agodoc: changes -- Add fixes for VMOVNTDQA, MOVNTDQA, MOVLPD
Cyrill Gorcunov [Sun, 21 Jul 2013 07:19:27 +0000 (11:19 +0400)]
doc: changes -- Add fixes for VMOVNTDQA, MOVNTDQA, MOVLPD

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
10 years agotest: Add br978756
Cyrill Gorcunov [Sun, 21 Jul 2013 10:45:02 +0000 (14:45 +0400)]
test: Add br978756

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
10 years agotest: Add br3392259
Cyrill Gorcunov [Sun, 21 Jul 2013 07:18:01 +0000 (11:18 +0400)]
test: Add br3392259

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
10 years agoinsns: Fix MOVLPD
Cyrill Gorcunov [Sun, 21 Jul 2013 07:37:43 +0000 (11:37 +0400)]
insns: Fix MOVLPD

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

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
10 years agoinsns: Fix MOVNTDQA instruction
Cyrill Gorcunov [Sun, 21 Jul 2013 07:14:04 +0000 (11:14 +0400)]
insns: Fix MOVNTDQA instruction

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

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
10 years agoinsns: Fix VMOVNTDQA instruction
Cyrill Gorcunov [Sun, 21 Jul 2013 07:13:15 +0000 (11:13 +0400)]
insns: Fix VMOVNTDQA instruction

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

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
10 years agochanges.src: Prepare for 2.10.08
Cyrill Gorcunov [Sat, 20 Jul 2013 20:42:47 +0000 (00:42 +0400)]
changes.src: Prepare for 2.10.08

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
10 years agoBR 3392260: Handle instructions only separated by vector SIB size
H. Peter Anvin [Sat, 20 Jul 2013 00:06:08 +0000 (17:06 -0700)]
BR 3392260: Handle instructions only separated by vector SIB size

There are two instructions (VGATHERQPS, VPGATHERQD) where the only
separation between two forms is the vector length given to the vector
SIB.  This means the *matcher* has to be able to distinguish
instructions by vector SIB length and the matcher only operates on the
operands and the instruction flags, not on the bytecode.

Export the vector index-ness into the operand flags and add to the
matcher.

This resolves BR 3392260.

Reported-by: Agner <agner@anger.org>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
10 years agoparse_line: Shrink code with memset helper
Cyrill Gorcunov [Mon, 15 Jul 2013 21:33:09 +0000 (01:33 +0400)]
parse_line: Shrink code with memset helper

We know that P_none = 0 thus instead of using
for() statement assign them all in one memset
call.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
10 years agoea_type: Fix typo in comment
Cyrill Gorcunov [Sun, 14 Jul 2013 14:45:48 +0000 (18:45 +0400)]
ea_type: Fix typo in comment

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
11 years agoautoconf: Warn a user if no asciidoc/xmlto found
Cyrill Gorcunov [Thu, 4 Jul 2013 21:33:09 +0000 (01:33 +0400)]
autoconf: Warn a user if no asciidoc/xmlto found

It's been noticed on nasm forum that we don't complain
if no asciidoc/xmlto package installed on a system while
they are required for man pages generation.

So warn a user then, but still allow to build nasm.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
11 years agomake: Fix nasm build with MSVC
Marat Dukhan [Sat, 29 Jun 2013 21:30:44 +0000 (01:30 +0400)]
make: Fix nasm build with MSVC

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

Signed-off-by: Marat Dukhan <maratek@gmail.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
11 years agoinsns: Fix vspllw instruction
MITSUNARI Shigeo [Sat, 22 Jun 2013 22:01:05 +0000 (07:01 +0900)]
insns: Fix vspllw instruction

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

Signed-off-by: MITSUNARI Shigeo <herumi@nifty.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
11 years agoinsns: Fix vgatherqpd instruction
MITSUNARI Shigeo [Thu, 30 May 2013 06:21:55 +0000 (15:21 +0900)]
insns: Fix vgatherqpd instruction

Signed-off-by: MITSUNARI Shigeo <herumi@nifty.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
11 years agoinsns: Fix VPMOVSXBQ instruction
MITSUNARI Shigeo [Fri, 24 May 2013 08:02:31 +0000 (12:02 +0400)]
insns: Fix VPMOVSXBQ instruction

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

Signed-off-by: MITSUNARI Shigeo <herumi@nifty.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
11 years agoMake the errors for missing man page tools comprehensible
H. Peter Anvin [Fri, 17 May 2013 19:02:49 +0000 (12:02 -0700)]
Make the errors for missing man page tools comprehensible

A lot of confusion was had due to missing asciidoc...

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
11 years agotest: Add br3392252 test
Cyrill Gorcunov [Sun, 12 May 2013 22:21:08 +0000 (02:21 +0400)]
test: Add br3392252 test

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
11 years agoinsns.dat: Add note about AMD TBM instructions
Cyrill Gorcunov [Sun, 12 May 2013 17:13:04 +0000 (21:13 +0400)]
insns.dat: Add note about AMD TBM instructions

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
11 years agoinsns.dat: Add BLCMSK
Cyrill Gorcunov [Sun, 12 May 2013 17:12:35 +0000 (21:12 +0400)]
insns.dat: Add BLCMSK

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
11 years agoinsns.dat: Add BLCS
Cyrill Gorcunov [Sun, 12 May 2013 17:12:01 +0000 (21:12 +0400)]
insns.dat: Add BLCS

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
11 years agoinsns.dat: Add BLSFILL
Cyrill Gorcunov [Sun, 12 May 2013 17:11:00 +0000 (21:11 +0400)]
insns.dat: Add BLSFILL

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
11 years agoinsns.dat: Add BLCFILL
Cyrill Gorcunov [Sun, 12 May 2013 17:10:34 +0000 (21:10 +0400)]
insns.dat: Add BLCFILL

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
11 years agoinsns.dat: Add BLCIC
Cyrill Gorcunov [Sun, 12 May 2013 17:09:42 +0000 (21:09 +0400)]
insns.dat: Add BLCIC

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
11 years agoinsns.dat: Add BLCI
Cyrill Gorcunov [Sun, 12 May 2013 17:09:09 +0000 (21:09 +0400)]
insns.dat: Add BLCI

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
11 years agoinsns.dat: Add BLSIC
Cyrill Gorcunov [Sun, 12 May 2013 17:08:26 +0000 (21:08 +0400)]
insns.dat: Add BLSIC

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
11 years agoinsns.dat: Add immediate form of BEXTR
Cyrill Gorcunov [Sun, 12 May 2013 17:07:07 +0000 (21:07 +0400)]
insns.dat: Add immediate form of BEXTR

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
11 years agoinsns.dat: Add T1MSKC intstruction
Cyrill Gorcunov [Sun, 12 May 2013 17:06:26 +0000 (21:06 +0400)]
insns.dat: Add T1MSKC intstruction

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
11 years agoinsns.dat: Add TZMSK instruction
Cyrill Gorcunov [Sun, 12 May 2013 17:05:25 +0000 (21:05 +0400)]
insns.dat: Add TZMSK instruction

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
11 years agoinsns.dat: Move TZCNT for alphabetical order
Cyrill Gorcunov [Sun, 12 May 2013 17:04:41 +0000 (21:04 +0400)]
insns.dat: Move TZCNT for alphabetical order

Other instructions in this section already sorted.
No func changes.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
11 years agoMake .git-ignore directory to ignore by scm
Cyrill Gorcunov [Fri, 10 May 2013 09:27:02 +0000 (13:27 +0400)]
Make .git-ignore directory to ignore by scm

To stash various code which a developer not
need to be tracked.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
11 years agoAdd IF_TBM flag
Cyrill Gorcunov [Fri, 10 May 2013 09:24:15 +0000 (13:24 +0400)]
Add IF_TBM flag

For TMB instructions

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
11 years agoBR3392253: Fix potential buffer overflow in number conversion
Cyrill Gorcunov [Mon, 6 May 2013 19:43:43 +0000 (23:43 +0400)]
BR3392253: Fix potential buffer overflow in number conversion

Reported-by: franck.uberto@esrf.fr
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
11 years agoinsns.dat: Udate year
Cyrill Gorcunov [Fri, 3 May 2013 22:24:38 +0000 (02:24 +0400)]
insns.dat: Udate year

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
11 years agobr3392250: insns -- Allow byte size in PREFETCHTx instructions
Cyrill Gorcunov [Fri, 3 May 2013 22:24:05 +0000 (02:24 +0400)]
br3392250: insns -- Allow byte size in PREFETCHTx instructions

The PREFETCHTx instructions do allow mem8 (byte).

Reported-by: Agner <agner@agner.org>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
11 years agoBR3392244: docs -- Fix "respectively" typo
Cyrill Gorcunov [Sun, 28 Apr 2013 11:07:38 +0000 (15:07 +0400)]
BR3392244: docs -- Fix "respectively" typo

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
11 years agoBR3392248: Update nasm -h output
Cyrill Gorcunov [Sat, 20 Apr 2013 16:37:17 +0000 (20:37 +0400)]
BR3392248: Update nasm -h output

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
11 years agoBR3392248: Update nasm manual
Cyrill Gorcunov [Sat, 20 Apr 2013 16:24:01 +0000 (20:24 +0400)]
BR3392248: Update nasm manual

Add -W description

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
11 years agondisasm: man -- Add missing -p option
Cyrill Gorcunov [Sat, 20 Apr 2013 16:18:46 +0000 (20:18 +0400)]
ndisasm: man -- Add missing -p option

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
11 years agoBR3392248: Update ndisasm man
Cyrill Gorcunov [Sat, 20 Apr 2013 16:14:45 +0000 (20:14 +0400)]
BR3392248: Update ndisasm man

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
11 years agoBR3392248: Update ndisasm man
Cyrill Gorcunov [Sat, 20 Apr 2013 16:13:51 +0000 (20:13 +0400)]
BR3392248: Update ndisasm man

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
11 years agoBR3392248: Update nasm manual
Cyrill Gorcunov [Sat, 20 Apr 2013 16:10:15 +0000 (20:10 +0400)]
BR3392248: Update nasm manual

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
11 years agoFixed two more resource leaks in rdoff/rdlib.c
Philipp Kloke [Sun, 31 Mar 2013 10:20:10 +0000 (12:20 +0200)]
Fixed two more resource leaks in rdoff/rdlib.c

Signed-off-by: Philipp Kloke <philipp.kloke@web.de>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
11 years agoFixed three possible buffer overflows
Philipp Kloke [Sun, 31 Mar 2013 10:03:47 +0000 (12:03 +0200)]
Fixed three possible buffer overflows

Bug found by: CppCheck 1.59 (static source analysis tool)

Signed-off-by: Philipp Kloke <philipp.kloke@web.de>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
11 years agoFixed several resource and memory leaks
Philipp Kloke [Sun, 31 Mar 2013 10:02:30 +0000 (12:02 +0200)]
Fixed several resource and memory leaks

Bug found by: CppCheck 1.59 (static source analysis tool)

Signed-off-by: Philipp Kloke <philipp.kloke@web.de>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
11 years agoFixed wrong/redundant comparison according to documentation in comment above.
Philipp Kloke [Sun, 31 Mar 2013 10:01:23 +0000 (12:01 +0200)]
Fixed wrong/redundant comparison according to documentation in comment above.

Bug found by: CppCheck 1.59 (static source analysis tool)

Signed-off-by: Philipp Kloke <philipp.kloke@web.de>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
11 years agoFixed wrong format specifier in format string
Philipp Kloke [Sun, 31 Mar 2013 10:00:09 +0000 (12:00 +0200)]
Fixed wrong format specifier in format string

Signed-off-by: Philipp Kloke <philipp.kloke@web.de>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
11 years agoRemove unnecessary calls to memset
Philipp Kloke [Sun, 31 Mar 2013 09:59:22 +0000 (11:59 +0200)]
Remove unnecessary calls to memset

The C standard guarantees that strncpy pads
the string with zeros if source string is smaller
than destination buffer.

Signed-off-by: Philipp Kloke <philipp.kloke@web.de>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
11 years agoMake F2 and F3 SSE prefixes override 66
Ben Rudiak-Gould [Sun, 10 Mar 2013 17:46:12 +0000 (21:46 +0400)]
Make F2 and F3 SSE prefixes override 66

According to XED and experimentation, the 66 is ignored.

Signed-off-by: Ben Rudiak-Gould <benrudiak@gmail.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
11 years agoDrop SAME_AS flag from instruction matcher
Ben Rudiak-Gould [Wed, 27 Feb 2013 18:13:14 +0000 (10:13 -0800)]
Drop SAME_AS flag from instruction matcher

It was there to support the SSE5 DREX encoding,
which as far as I know is dead forever.

Signed-off-by: Ben Rudiak-Gould <benrudiak@gmail.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
11 years agoinsns: Remove pushseg/popseg internal bytecodes
Ben Rudiak-Gould [Sun, 3 Mar 2013 14:43:07 +0000 (18:43 +0400)]
insns: Remove pushseg/popseg internal bytecodes

This patch is getting rid of the following bytecodes
'pushseg','popseg','pushseg2','popseg2' and simplifies
overall code.

[gorcunov@: a few style fixes]
Signed-off-by: Ben Rudiak-Gould <benrudiak@gmail.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
11 years agoMove conditional opcodes close to enum ccode definition
Cyrill Gorcunov [Sun, 3 Mar 2013 10:34:31 +0000 (14:34 +0400)]
Move conditional opcodes close to enum ccode definition

Thus if someone need to rework this code he won't need
to jump between files trying to figure out where enum
and opcodes lay.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
11 years agoinsns.pl: Various style polyshing
Cyrill Gorcunov [Fri, 1 Mar 2013 22:57:58 +0000 (02:57 +0400)]
insns.pl: Various style polyshing

 - convert tabs to spaces
 - align octal opcodes

No func changes.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
11 years agoassemble: Make emit_rex being a function
Cyrill Gorcunov [Fri, 1 Mar 2013 22:48:23 +0000 (02:48 +0400)]
assemble: Make emit_rex being a function

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
11 years agoassemble: Use case3/4 where appropriate
Cyrill Gorcunov [Sat, 1 Dec 2012 22:51:18 +0000 (02:51 +0400)]
assemble: Use case3/4 where appropriate

This allows to shrink code a bit.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
11 years agoassemble: Add case3 helper
Cyrill Gorcunov [Sat, 1 Dec 2012 22:47:16 +0000 (02:47 +0400)]
assemble: Add case3 helper

Signed-off-by: cyrill <cyrill@cyrills-MacBook-Pro.local>
11 years agoprocess_ea: Drop redundant variable
Cyrill Gorcunov [Sat, 1 Dec 2012 15:38:47 +0000 (19:38 +0400)]
process_ea: Drop redundant variable

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
11 years agoRemove +s
Ben Rudiak-Gould [Fri, 1 Mar 2013 06:28:32 +0000 (10:28 +0400)]
Remove +s

It doesn't seem worth >200 lines of C and Perl to save ~50 lines in insns.dat.

In order to make this work I had to rename sbyte16/sbyte32 so that
they can take an ordinary size suffix (their size suffix was formerly
treated specially).

This fixes one disassembly bug: 48C7C000000080 disassembles to mov
rax,0x80000000, which reassembles to B800000080, which loads a
different value.

Signed-off-by: Ben Rudiak-Gould <benrudiak@gmail.com>
Acked-by: "H. Peter Anvin" <hpa@zytor.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
11 years agoFix warnings generated by clang 3.0
Andrew Nayenko [Sun, 24 Feb 2013 19:08:40 +0000 (23:08 +0400)]
Fix warnings generated by clang 3.0

Fix warnings like this:

output/outelf32.c:2120:33: warning: equality comparison with extraneous
      parentheses [-Wparentheses-equality]
            if ((match->section == index)) {
                 ~~~~~~~~~~~~~~~^~~~~~~~
output/outelf32.c:2120:33: note: remove extraneous parentheses around the
      comparison to silence this warning
            if ((match->section == index)) {
                ~               ^       ~
output/outelf32.c:2120:33: note: use '=' to turn this equality comparison into
      an assignment
            if ((match->section == index)) {
                                ^~
                                =
1 warning generated.

Signed-off-by: Andrew Nayenko <resver@gmail.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
11 years agoBR3392242: insns.dat -- Support AMD SVM instructions in 32bit mode
Andrew Nayenko [Wed, 20 Feb 2013 22:36:57 +0000 (02:36 +0400)]
BR3392242: insns.dat -- Support AMD SVM instructions in 32bit mode

AMD CPUs do support SVM instructions in 32-bit mode thus drop X64
restriction from instructions template where appropriate.

Signed-off-by: Andrew Nayenko <resver@gmail.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
11 years agoFix jmp/call near offsets in long mode
Ben Rudiak-Gould [Wed, 20 Feb 2013 19:25:59 +0000 (23:25 +0400)]
Fix jmp/call near offsets in long mode

In long mode relative offsets are always 32 bits sign-extended to 64
bits and absolute near addresses are always 64 bits, regardless of the
operand size.

Signed-off-by: Ben Rudiak-Gould <benrudiak@gmail.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
11 years agoAdd np and similar prefixes to instructions that should have them
Ben Rudiak-Gould [Wed, 20 Feb 2013 19:25:54 +0000 (23:25 +0400)]
Add np and similar prefixes to instructions that should have them

This adds "np" to a bunch of SSE-style instructions that should have
it, "norep" (which was implemented but unused) on quasi-SSE instructions
that use F2 and F3 as instruction extensions but 66 for operand size,
"nof3" (newly implemented) on a few instructions, "norexw" on some
instructions that have only 32-bit and 64-bit versions, and one NOLONG.

It also removes some incorrect "np"s, changes some "f3"s to "f3i"s,
and fixes the decoding of the XCHG/NOP/PAUSE mess: F390 is always
PAUSE even when rex.b=1 (at least according to XED).

Signed-off-by: Ben Rudiak-Gould <benrudiak@gmail.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 years agoNASM 2.10.05
H. Peter Anvin [Sun, 9 Sep 2012 20:21:11 +0000 (13:21 -0700)]
NASM 2.10.05