Commit graph

2458 commits

Author SHA1 Message Date
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
Cyrill Gorcunov
f4941892b3 Drop unused 'arg' variable
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-07-17 13:55:25 +04:00
Cyrill Gorcunov
5b49af4ff2 Merge branch 'nasm-2.09.xx'
Conflicts:
	version

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-07-16 01:44:57 +04:00
Cyrill Gorcunov
fbde522e05 NASM-2.09.10
- Fix nasty problem with uninstaller in case of registry
  keys corruption, which might lead to arbitrary files
  removal.

  Just to be sure the proper files and directories are to
  be removed a few additional questions are brought into
  deinstallation procedure.

  The former issue reported here

	http://forum.nasm.us/index.php?topic=1013.0

  Note: no functional changes are done inside nasm code,
  critical fixes will be ported to 2.09.xx branch, but
  mostly the (more or less) active development and various
  bug fixes are concentrated around 2.10 series.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-07-16 01:41:28 +04:00
Cyrill Gorcunov
ed48ab815e doc: Describe changes for nasm-2.09.10
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-07-16 01:33:00 +04:00
Cyrill Gorcunov
25c53e4eb1 nsis: Remove desktop bat link as well
In case of installation procedure being used in
a per-user fasion the display link to a bat file
remain untouched at uninstallation time. Fix it.

I hope this time all things go smooth.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-07-15 23:14:53 +04:00
Cyrill Gorcunov
3704d2d994 nsis: Inform a user about files being deleted
Since a user might have some weird access rules on NTFS
such as allow to write files but not to delete them it
might happen that uninstallation procedure fails at
deleting files but deleting registry keys still success,
and in result a user might try to uninstall nasm for second
time with registry keys corrupted.

So prompt a user with files being deleted so he can double
check what is going on.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-07-15 23:14:43 +04:00
Cyrill Gorcunov
2f39e1a066 nsis: Make sure the registry keys exist
It was reported on nasm forum (http://forum.nasm.us/index.php?topic=1013.0)
that if uninstallation procedure get stopped (for any reason) in a middle
leading to read empty registry values an attempt to remove arbitrary
files might happen. So make sure there are some sane values in registry.

N.B: People, if you find some bug in nasm, don't write to forum, file
bug directly in bugzilla, if it's not a bug we simply close it, otherwise
we might miss serious problems like this one!

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-07-15 23:14:32 +04:00
Cyrill Gorcunov
98de334949 nsis: Remove desktop bat link as well
In case of installation procedure being used in
a per-user fasion the display link to a bat file
remain untouched at uninstallation time. Fix it.

I hope this time all things go smooth.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-07-15 23:13:26 +04:00
Cyrill Gorcunov
ee42e62c7c nsis: Inform a user about files being deleted
Since a user might have some weird access rules on NTFS
such as allow to write files but not to delete them it
might happen that uninstallation procedure fails at
deleting files but deleting registry keys still success,
and in result a user might try to uninstall nasm for second
time with registry keys corrupted.

So prompt a user with files being deleted so he can double
check what is going on.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-07-15 22:38:47 +04:00
H. Peter Anvin
9f0dcfc724 A few more AVX2 spec instructions
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2011-07-08 16:08:34 -07:00
H. Peter Anvin
cffe61e776 Use a normal quad-case for valueless /is4
When we don't have an immediate for the i-field in /is4, then use a
normal quad-bytecode encoding for it to save some small amount of
space and re-use existing machinery.

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2011-07-07 17:21:24 -07:00
H. Peter Anvin
fc561203fd Remove support for DREX encoding
The DREX encoding never hit production silicon, and has been replaced
by VEX/XOP encoding, so remove support for it.

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2011-07-07 16:58:22 -07:00
H. Peter Anvin
573aea590e insns.dat: Clean up and fix the BMI instruction patterns
Clean up the formatting of the BMI instruction patterns, and fix:

a) X64,FUTURE is wrong - it needs to be LONG,FUTURE
b) Fix the BLSI, BLSMSK, BLSR instruction patterns
c) Use a bracket pattern for TZCNT

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2011-07-07 15:29:14 -07:00
Jasper Neuman
5cc798c612 insns: Fix up RORX template
Missed 64 bit case.

Signed-off-by: Jasper Neuman <jasper.neumann@web.de>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-07-07 11:02:11 +04:00
Jasper Neuman
c1610e6abe insns.dat: Add some BMI1 and BMI2 instructions
Signed-off-by: Jasper Neuman <jasper.neumann@web.de>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-07-07 01:08:51 +04:00