Commit Graph

2702 Commits

Author SHA1 Message Date
Jin Kyu Song
f9442f67d5 AVX-512: Add a test case for EVEX encoded instructions
This was converted from a gas testsuite.
(gas/testsuite/gas/i386/x86-64-avx512f-intel.d)
A python script that is used for converting is also included.

Signed-off-by: Jin Kyu Song <jin.kyu.song@intel.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2013-08-28 14:27:17 +04:00
Jin Kyu Song
66c61926b1 AVX-512: Fix match function to check the range of registers
High-16 registers of XMM and YMM need to be encoded with EVEX not VEX.
Even if all the operand types match with VEX instruction format,
it should use EVEX instead.

Signed-off-by: Jin Kyu Song <jin.kyu.song@intel.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2013-08-28 09:37:31 +04:00
Jin Kyu Song
9bb987d8e0 AVX-512: Change the data type for instruction flags
Increased the size of data type for instruction flags from 32bits to 64bits.
And a new type (iflags_t) is defined for better maintainability.

Bigger data type is needed because more instruction set types are coming
but there were not enough space for them. Since they are not bit masks,
only one instruction set is allowed for each instruction.

Signed-off-by: Jin Kyu Song <jin.kyu.song@intel.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2013-08-28 09:37:21 +04:00
Jin Kyu Song
d2d9c3ee38 AVX-512: Fix a bug in calculating Disp8*N value
Fixed a bug that derived an incorrect N value for tuple types of
T2, T4, T8.

Signed-off-by: Jin Kyu Song <jin.kyu.song@intel.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2013-08-28 09:37:14 +04:00
Jin Kyu Song
4a6570616a AVX-512: Find the correct position of the last SIMD op
Since embedded rounding mode is following the last SIMD op,
GPR op should be skipped when finding the last SIMD op.

Signed-off-by: Jin Kyu Song <jin.kyu.song@intel.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2013-08-28 09:35:54 +04:00
Jin Kyu Song
c62bc20a0b AVX-512: Moved {er} decorator position next to the last SIMD op
This is for following the current syntax used in gas even though
this is not SDM conforming.
According to SDM, {er} should follow the last GPR op not SIMD op.
e.g. SDM : VCVTSI2SD xmm1, xmm2, r/m64{er}
    NASM : VCVTSI2SD xmm1, xmm2{er}, r/m64

Signed-off-by: Jin Kyu Song <jin.kyu.song@intel.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2013-08-28 09:35:47 +04:00
Jin Kyu Song
50ab1522e9 AVX-512: Fix parser to handle opmask decorator correctly
When a memory reference operand is a destination, this could have
an opmask decorator as well.

Signed-off-by: Jin Kyu Song <jin.kyu.song@intel.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2013-08-22 19:37:49 +04:00
Jin Kyu Song
d4760c19b5 AVX-512: Add ZWORD keyword
ZWORD (512 bits) keyword is added

Signed-off-by: Jin Kyu Song <jin.kyu.song@intel.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2013-08-22 19:37:44 +04:00
Jin Kyu Song
4d1fc3f1a0 AVX-512: Fix instruction match function
When an instruction allows broadcasting, the memory element size is
different from the size of normal memory operation.
This information is provided in a decoflags field, so it should try to
match those properties before it fails.

Signed-off-by: Jin Kyu Song <jin.kyu.song@intel.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2013-08-22 19:37:37 +04:00
Jin Kyu Song
f9a71e0c38 AVX-512: Reword comment about opmask decorators
Previous comment was not so clear.

Signed-off-by: Jin Kyu Song <jin.kyu.song@intel.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2013-08-22 19:37:32 +04:00
Jin Kyu Song
a800aed7b7 AVX-512: Handle curly braces in multi-line macro parameters
Multi-line macro uses curly braces for enclosing a parameter
containing comma(s). Passing curly braces as a part of a parameter
which is already enclosed with braces confuses the macro expander.

Escape character '\' is prefixed in this case.
e.g.) mmacro {1,2,3}, {4,\{5,6\}}
      mmacro gets 2 parameters of '1,2,3' and '4,{5,6}'

Signed-off-by: Jin Kyu Song <jin.kyu.song@intel.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2013-08-22 19:37:25 +04:00
Jin Kyu Song
cc1dc9de53 AVX-512: Add EVEX encoding and new instructions
EVEX encoding support includes 32 vector regs (XMM/YMM/ZMM),
opmask, broadcasting, embedded rounding mode,
suppress all exceptions, compressed displacement.

Signed-off-by: Jin Kyu Song <jin.kyu.song@intel.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2013-08-16 09:06:15 +04:00
Jin Kyu Song
72018a2b43 AVX-512: Add support for parsing braces
AVX-512 introduced new syntax using braces for decorators.
Opmask, broadcat, rounding control use this new syntax.

http://software.intel.com/sites/default/files/319433-015.pdf

Signed-off-by: Jin Kyu Song <jin.kyu.song@intel.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2013-08-06 09:37:52 +04:00
Cyrill Gorcunov
b775985bee NASM 2.10.09 2013-07-23 09:36:13 +04:00
Cyrill Gorcunov
e74e494805 doc: changes -- Prepare for 2.10.09
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2013-07-23 09:36:00 +04:00
Cyrill Gorcunov
99427bdb6c build: Include pregenerated nasm manpages
It's been reported that force people to install
asciidoc for man pages generation is not acceptible.
Just ship them pregenerated.

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

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2013-07-22 10:09:35 +04:00
Cyrill Gorcunov
57a576ce1e NASM 2.10.08
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2013-07-21 20:58:43 +04:00
Cyrill Gorcunov
85f734b6ab doc: changes -- Add fixes for VMOVNTDQA, MOVNTDQA, MOVLPD
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2013-07-21 14:47:51 +04:00
Cyrill Gorcunov
340ac1a915 test: Add br978756
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2013-07-21 14:45:48 +04:00
Cyrill Gorcunov
31d73aefb3 test: Add br3392259
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2013-07-21 14:45:48 +04:00
Cyrill Gorcunov
b59346d496 insns: Fix MOVLPD
http://bugzilla.nasm.us/show_bug.cgi?id=978756

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2013-07-21 14:45:48 +04:00
Cyrill Gorcunov
7dff2f028a insns: Fix MOVNTDQA instruction
http://bugzilla.nasm.us/show_bug.cgi?id=3392259

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2013-07-21 11:14:04 +04:00
Cyrill Gorcunov
d26ac53fe3 insns: Fix VMOVNTDQA instruction
http://bugzilla.nasm.us/show_bug.cgi?id=3392259

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2013-07-21 11:13:15 +04:00
Cyrill Gorcunov
82139da76e changes.src: Prepare for 2.10.08
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2013-07-21 00:45:02 +04:00
H. Peter Anvin
e20ca02cfb 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>
2013-07-19 17:09:39 -07:00
Cyrill Gorcunov
836492fbcf 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>
2013-07-16 01:33:09 +04:00
Cyrill Gorcunov
525ef26359 ea_type: Fix typo in comment
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2013-07-14 18:45:48 +04:00
Cyrill Gorcunov
ce074db7c2 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>
2013-07-05 01:33:09 +04:00
Marat Dukhan
1052394ef6 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>
2013-06-30 01:31:15 +04:00
MITSUNARI Shigeo
50a33b068b 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>
2013-06-30 01:27:24 +04:00
MITSUNARI Shigeo
93db8fc817 insns: Fix vgatherqpd instruction
Signed-off-by: MITSUNARI Shigeo <herumi@nifty.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2013-06-01 09:54:26 +04:00
MITSUNARI Shigeo
48129e5c8f 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>
2013-05-24 12:05:32 +04:00
H. Peter Anvin
a9397830f7 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>
2013-05-17 12:03:24 -07:00
Cyrill Gorcunov
29e2f74a58 test: Add br3392252 test
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2013-05-13 02:21:08 +04:00
Cyrill Gorcunov
b529149272 insns.dat: Add note about AMD TBM instructions
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2013-05-12 21:13:04 +04:00
Cyrill Gorcunov
016483fa87 insns.dat: Add BLCMSK
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2013-05-12 21:12:35 +04:00
Cyrill Gorcunov
2cbf52b08b insns.dat: Add BLCS
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2013-05-12 21:12:01 +04:00
Cyrill Gorcunov
91cda55b28 insns.dat: Add BLSFILL
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2013-05-12 21:11:00 +04:00
Cyrill Gorcunov
856386b87c insns.dat: Add BLCFILL
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2013-05-12 21:10:34 +04:00
Cyrill Gorcunov
921cf07221 insns.dat: Add BLCIC
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2013-05-12 21:09:42 +04:00
Cyrill Gorcunov
aeef0f38f9 insns.dat: Add BLCI
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2013-05-12 21:09:09 +04:00
Cyrill Gorcunov
0622f5a947 insns.dat: Add BLSIC
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2013-05-12 21:08:26 +04:00
Cyrill Gorcunov
cb8e493461 insns.dat: Add immediate form of BEXTR
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2013-05-12 21:07:07 +04:00
Cyrill Gorcunov
02b23d1d00 insns.dat: Add T1MSKC intstruction
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2013-05-12 21:06:26 +04:00
Cyrill Gorcunov
552dccbb22 insns.dat: Add TZMSK instruction
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2013-05-12 21:05:25 +04:00
Cyrill Gorcunov
b6b42e0611 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>
2013-05-12 21:04:41 +04:00
Cyrill Gorcunov
f0301980ab 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>
2013-05-10 13:27:02 +04:00
Cyrill Gorcunov
579f161d48 Add IF_TBM flag
For TMB instructions

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2013-05-10 13:24:15 +04:00
Cyrill Gorcunov
ce6527459f BR3392253: Fix potential buffer overflow in number conversion
Reported-by: franck.uberto@esrf.fr
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2013-05-06 23:43:43 +04:00
Cyrill Gorcunov
1ac3459539 insns.dat: Udate year
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2013-05-04 02:24:38 +04:00