Commit Graph

23 Commits

Author SHA1 Message Date
Tomasz Kantecki
c90d99a655 insns.dat: Add VPCLMULQDQ instruictions
https://bugzilla.nasm.us/show_bug.cgi?id=3392455

Signed-off-by: Tomasz Kantecki <tomasz.kantecki@intel.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2017-12-29 17:20:33 +03:00
Cyrill Gorcunov
f1f8ef48f4 insns-flags: Add VPCLMULQDQ flag
In sake of https://bugzilla.nasm.us/show_bug.cgi?id=3392455

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2017-12-29 17:20:29 +03:00
Cyrill Gorcunov
0ba95b7767 insns.dat: Move VAES instructions to AES group
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2017-12-29 17:20:25 +03:00
Tomasz Kantecki
3a6c71f931 insns.dat: Add VAESENC, VAESENCLAST instructions
Signed-off-by: Tomasz Kantecki <tomasz.kantecki@intel.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2017-12-29 17:20:21 +03:00
Cyrill Gorcunov
73ab510c71 insns-iflags: Add AES, VAES flags
In sake of https://bugzilla.nasm.us/show_bug.cgi?id=3392454

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2017-12-29 17:20:17 +03:00
H. Peter Anvin
ece809789e Merge remote-tracking branch 'origin/nasm-2.13.xx'
Resolved conflicts:
	version

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2017-11-01 10:37:18 -07:00
H. Peter Anvin
81fd01f9d0 BR 3392362: generate RMI versions of PEXTRW when possible
We could generate the MRI version (SSE 4.1) instead of the RMI
(SSE 2) version of these instructions if a 64-bit register was given
as the destination.

Reported-by: Vasiliy Olekhov <olekhov@gmail.com>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2017-09-27 15:55:57 -07:00
H. Peter Anvin
3cee8b4a4a insns.dat: change the title of the pseudo-ops section
Use the term pseudo-ops, as this is a well-known assembly term.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2017-05-01 21:46:34 -07:00
H. Peter Anvin
af9fe8f597 Don't sort opcodes; move all pseudo-ops to the beginning
We don't need to sort opcodes anymore, since we are using an O(1) hash
and not binary search.  Instead, sort them in the order they first
appear in insns.dat; this lets us move all the pseudo-ops to a
contiguous range at the start of the file, for more efficient
handling.

Change the functions that process pseudo-ops accordingly.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2017-05-01 21:44:24 -07:00
H. Peter Anvin
bdbaaa207c doc: clean up the instruction list in the documentation slightly
Compactify the instruction list in the documentation to have fewer
margin violations, and fix some of the headings (;#).

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2017-04-07 09:51:24 -07:00
H. Peter Anvin
e83311c73d BR 3392396: fix EVEX compressed displacements
The fvm: annotation to generate the correct EVEX compressed
displacements had inadvertently gotten dropped from a handful of
instructions in checkin c33d95fde9:

BR 3392370: {z} decorator allowed on MOVDQ* memory operands

Put them back, and verify they work.

Reported-by: Henrik <henrik@gramner.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2017-04-06 18:52:08 -07:00
H. Peter Anvin
526a6c7390 Rename insns-iflags.pl -> insns-iflags.ph, add missing dependency
insns-iflags.ph is included from another Perl script, so rename it .ph
(Perl header).  Add missing dependency to the main Makefile.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2017-04-03 10:33:12 -07:00
H. Peter Anvin
841d904f88 perl: change to the new, safer 3-operand form of open()
The 2-operand form was inherently unsafe.  Use the 3-operand form
instead, which guarantees that arbitrary filenames are supported.

This also means we can remove a few instances of sysopen() which was
used for exactly this reason, however, at least in theory sysopen()
isn't portable.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2017-04-02 19:36:41 -07:00
H. Peter Anvin
c33d95fde9 BR 3392370: {z} decorator allowed on MOVDQ* memory operands
The spec says very clearly the {z} decorator is allowed on memory
operands for the MOVDQ* instructions.  Remove special cases from the
code to disallow this case, which had the unfortunate effect of
generating a very uninformative error message.

Reported-by: Agner <agner@agner.org>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2017-03-31 14:37:24 -07:00
H. Peter Anvin
1a3314f64b insns.dat: use the officially documented UD0 and UD1 forms
The UD0 and UD1 opcodes are now officially documented, with UD1
officially documented to take a modr/m.  Still permit the "UD2B" and
argument-less aliases, but not as preferred.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2017-02-23 17:10:19 -08:00
Cyrill Gorcunov
dc9c312c97 insns.dat: Fix SHA256RNDS2 optional xmm0 argument
In commit 1eef781594 we allowed xmm0
to be implicit, then in dcaef4b095 it
occasionally got ripped off. Move it back.

https://bugzilla.nasm.us/show_bug.cgi?id=3392379

Reported-by: ig <glucksmann@avast.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2017-01-08 16:51:41 +03:00
H. Peter Anvin
70d0458050 Merge remote-tracking branch 'origin/nasm-2.12.xx'
Resolved Conflicts:
	output/outelf32.c
	output/outelf64.c

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2016-11-15 12:00:23 -08:00
Cyrill Gorcunov
6600eb1188 x86/insns.dat -- Fix typo in VMOVDQA instruction
https://bugzilla.nasm.us/show_bug.cgi?id=3392369

Reported-by: Agner <agner@agner.org>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2016-10-23 18:13:25 +03:00
H. Peter Anvin
da8659dfd0 Merge remote-tracking branch 'origin/nasm-2.12.xx'
Resolved Conflicts:
	version

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2016-10-04 00:30:17 -07:00
H. Peter Anvin
7a82ebe7bd disp8: make constant arrays in get_disp8N() static
The constant arrays in get_disp8N() should be static; otherwise the
compiler has to manifest them on the stack for every execution which
makes no sense at all.

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2016-08-25 17:40:13 -07:00
Henrik Gramner
de1fb48c3a insns.dat: Enable contracted forms for additional instructions
Improve consistency by allowing contracted forms for EVEX-encoded
instructions when it's allowed for similar VEX-encoded instructions.

Previously the behavior would change depending on the vector size or
the register number which could be somewhat confusing:

    vaddps xmm0, xmm1  ; ok
    vaddps ymm0, ymm1  ; ok
    vaddps zmm0, zmm1  ; error
    vaddps xmm0, xmm16 ; error

Also allow contracted forms for a few additional older AVX instructions
where it makes sense.

Signed-off-by: Henrik Gramner <henrik@gramner.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2016-08-18 00:50:31 +03:00
Henrik Gramner
865c31c676 insns.dat: Fix EVEX vpbroadcast(b|w), vpextr(b|w), and vpinsr(b|w)
Use the correct T1S compressed displacements.

https://bugzilla.nasm.us/show_bug.cgi?id=3392302
https://bugzilla.nasm.us/show_bug.cgi?id=3392314

Signed-off-by: Henrik Gramner <henrik@gramner.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2016-08-18 00:50:14 +03:00
H. Peter Anvin
e1f985c167 Reorganize the source code into subdirectories
Make the source code easier to understand and keep track of by
organizing it into subdirectories depending on the function.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2016-05-25 12:06:29 -07:00