Commit Graph

2523 Commits

Author SHA1 Message Date
Cyrill Gorcunov
18914e6330 BR3392198: Fix compilation warning on prefixes
insn->prefixes might contain not only values from
'enum prefixes' but from 'enum reg_enum' as well so
make it generic 'int' instead.

This calms down the compiler about enum's mess and
eliminates a wrong assumption that we always have
values by particular type in this field.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-11-12 11:41:51 +04:00
Cyrill Gorcunov
013da29782 BR3392195: insns: Drop MMX flag from MOVD
Typo in specification.

Reported-by: Jasper Neumann <sirrida@web.de>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-11-12 09:47:27 +04:00
Cyrill Gorcunov
eb786412f6 insns: Fix typos for vcmpeq aliases
The patch came from herumi@nifty.com

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-11-11 13:04:20 +04:00
Cyrill Gorcunov
5c607760fe preproc: Drop NULL assignments for static variables
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-10-09 19:04:14 +04:00
Cyrill Gorcunov
9900c6b081 preproc: A few style fixups
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-10-09 18:58:46 +04:00
Cyrill Gorcunov
00724242cb BR3376406: Update default optimization level in man
Update default optimization level in man to reflect
the reality.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-10-06 00:26:36 +04:00
Cyrill Gorcunov
70712c0df6 insns: Add MOVD as aliases to MOVQ for compatibility with AMD
AMD has MOVD for both 32bit and 64bit GPRs so in a sake of
compatibility bring them into insns.dat.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-10-02 10:53:37 +04:00
Cyrill Gorcunov
6acada6f39 preproc: %ifenv should require environment variable name to exist
Otherwise naked %ifenv/%endif passes without a notice.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-10-02 09:18:34 +04:00
Cyrill Gorcunov
4c6f82f78f BR3414012: Make %if[n]def to handle tail spaces
In case if there a trailing spaces after expansion
%if[n]def might produce a false alarms on macro id
being expected.

Note it also makes the constructions like bare

	%ifdef
	%endif

invalid, while before they were passed well without
a notice.

Reported-by: KO Myung-Hun
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-10-02 01:08:02 +04:00
Cyrill Gorcunov
d6851d4d26 assemble: Drop redundant variable
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-09-25 18:01:45 +04:00
Jiri Malak
a2c7855577 BR3411280: Fix incorrect compiler option for OS/2 target in Open Watcom makefile
For OS2 target the -bt option should be set accordingly.

Signed-off-by: Jiri Malak <malak.jiri@gmail.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-09-20 21:37:06 +04:00
Cyrill Gorcunov
9022212ba9 insns.dat: Fixup VGATHERx instructions
As being spotted by nasm64developer the memory
operands size is incorrect. Fix it.

Reported-by: nasm64developer
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-08-31 01:34:43 +04:00
Cyrill Gorcunov
2c3f7573b8 Add AVX2 test file
nasm64developer kindly provided a testfile converted
to nasm format.

http://sourceware.org/ml/binutils/2011-06/msg00150.html

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-08-31 01:22:43 +04:00
Cyrill Gorcunov
10734c7e58 A couple of simplifications to assemble.c
- GEN_SIB and GEN_MODRM helpers added
 - a number of tabs vs space fixs
 - more use of is_class() helper

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-08-29 00:07:17 +04:00
Cyrill Gorcunov
1f4ccb9282 parser: No need to split line if it a bit longer than 80 chars
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-08-28 19:53:11 +04:00
Cyrill Gorcunov
5abbe375cf Add IS_SREG and IS_FSGS helpers
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-08-28 18:49:00 +04:00
Cyrill Gorcunov
447e20cf96 A few style fixups in parser.c
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-08-28 18:02:31 +04:00
Cyrill Gorcunov
7add67f949 elf64: Make linelist to look the same as elf32
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-08-28 17:07:26 +04:00
Cyrill Gorcunov
5a8944af59 elf32: Drop holes in linelist structure
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-08-28 17:05:17 +04:00
Cyrill Gorcunov
e07bd499f8 outobj: Reorder Segment members to eliminate holes
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-08-28 17:03:21 +04:00
Cyrill Gorcunov
a30090b7e5 outieee: Reorder ieeeSection members to eliminate holes
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-08-28 17:00:04 +04:00
Cyrill Gorcunov
cdb8cd7b22 Drop empty line and bracket
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-08-28 16:33:39 +04:00
Cyrill Gorcunov
c026df26c3 Style tuneup of nasm.h
- a number of tabs to space conversion
 - redundant spaces removed
 - structure elements alignment

No functional changes.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-08-28 15:00:26 +04:00
H. Peter Anvin
57078f061d disasm.c: ESP/RSP cannot be indicies, but XMM4/YMM4 can be
If we have XMM4/YMM4 as a VSIB, it does not mean no index; that is
only for scalar encoding.

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2011-08-22 14:09:04 -07:00
H. Peter Anvin
9f2043eaad assemble.c: remove stray debugging code
My bad for checking this in at all.

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2011-08-22 13:52:02 -07:00
Cyrill Gorcunov
db3f71bc67 insns, avx2: A couple of upper-case to lower-case conversion
Just to be solid in style

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-08-23 00:35:32 +04:00
Cyrill Gorcunov
b16bb628ce insns, avx2: A typo in VPERMPD
The second VPERMD should be VPERMPD actually.

Thanks to nasm64developer for gas test file provided
which allowed to reveal this issue.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-08-23 00:30:28 +04:00
Cyrill Gorcunov
c4d328c165 assemble.c: Comment out debug printing
Probably we need some kind of pr_debug or
something like that instead.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-08-23 00:12:50 +04:00
Cyrill Gorcunov
4c78ab3474 BR3385573: Some AVX2 instructions fixups
A few instruction templates for AVX2 set were wrong.

Reported-by: Agner Fog
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-08-22 01:38:40 +04:00
Cyrill Gorcunov
c7970eb4a3 insns: Change VPERMPQ to VPERMQ
Was a typo

Reported-by: Agner Fog
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-08-03 22:16:29 +04:00
Cyrill Gorcunov
6b4a64167c preproc: Drop emitting() rudimanet
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-08-01 00:20:13 +04:00
Keith Kanios
099749292c doc: update documentation for pending 2.10 release 2011-07-30 13:14:18 -05:00
H. Peter Anvin
21e7050c1a NASM 2.10rc8 2011-07-27 14:32:08 -07:00
Anonymous
e837a7b4ea Implement insns.dat in human readable form
I converted almost all instructions in insns.dat (version
 7a6f978698) to the more
 readable format that insns.pl has supported for years.

 I also made some changes to insns.pl. You can verify that the
 new insns.dat and insns.pl produce byte-identical output to
 the old insns.dat and insns.pl, so I think that this change
 is safe to check in, even though it is a large change to
 insns.dat.

The changes to insns.pl are:

 * fixed a bug: ib,u was not recognized
 * added support for a second immediate argument called "j" for
   instructions like ENTER imm,imm
 * added a "+r" syntax for \10..\13

[gorcunov: insns files remains the same, great job anonymous!]

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-07-20 21:47:53 +04:00
Cyrill Gorcunov
bc0206dc3f NASM 2.10.rc7
Intel's AVX2 instructions should be covered now.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-07-20 01:30:31 +04:00
Cyrill Gorcunov
f757614d48 insns: A final pile of AVX2 instructions
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-07-20 01:16:11 +04:00
Cyrill Gorcunov
7a0c878ffb insns: A few additional AVX2 templates
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-07-19 17:01:35 +04:00
Cyrill Gorcunov
7a6f978698 insns: One more small snippet of AVX2
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-07-18 01:15:25 +04:00
Cyrill Gorcunov
55a12fddc7 insns: One more slab of AVX2 instructions
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-07-18 00:57:35 +04:00
Cyrill Gorcunov
89a38dac36 insns: Add a slab of AVX2 instructions
Not all are covered yet, but still a step
forward I think.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-07-17 23:20:00 +04:00
Cyrill Gorcunov
80c7efbad4 insns.dat: Move exsiting AVX2 insns to a separate section
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-07-17 20:24:16 +04:00
Cyrill Gorcunov
f30cf73533 preproc: Align members in structures
For easier reading

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-07-17 20:20:14 +04:00
Cyrill Gorcunov
d57a031616 preproc: Reorder ExpInv to drop padding
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-07-17 20:11:08 +04:00
Cyrill Gorcunov
10083ae953 preproc: Reorder SMacro members to eliminate padding
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-07-17 20:06:20 +04:00
Cyrill Gorcunov
d47e00db4c nasm.h: Reorder tokenval members to drop padding
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-07-17 20:00:30 +04:00
Cyrill Gorcunov
7248f8c9e9 Some cleanup on insns.h
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-07-17 17:52:03 +04:00
Cyrill Gorcunov
2b34d06419 Drop unused 'opt' from nasm_opt_val
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-07-17 14:06:54 +04:00
Cyrill Gorcunov
32af9d75f3 elf64: Drop unused 'zero' variable
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-07-17 14:04:44 +04:00
Cyrill Gorcunov
397402016f Drop unused 'type' from gencode
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-07-17 14:02:52 +04:00
Cyrill Gorcunov
0aa9bdf7b2 Fix saa_writeaddr for big-endian case
saa_writeaddr on big-endian archs didn't write converted
argument, fix it.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-07-17 13:59:13 +04:00