Commit Graph

380 Commits

Author SHA1 Message Date
Cyrill Gorcunov
b854be2772 insns.dat: Add CLZERO AMD instruction
https://sourceware.org/ml/binutils/2015-03/msg00078.html
http://bugzilla.nasm.us/show_bug.cgi?id=3392337

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2016-03-05 12:39:06 +03:00
Cyrill Gorcunov
a19c22ec90 insns.dat: Add MONITORX/MWAITX AMD instructions
http://bugzilla.nasm.us/show_bug.cgi?id=3392336

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2016-03-05 01:36:49 +03:00
Cyrill Gorcunov
8ab77b59e2 insns.dat: Add SMSW for 64 bit mode
http://bugzilla.nasm.us/show_bug.cgi?id=3392323

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2015-09-13 16:30:21 +03:00
Cyrill Gorcunov
373583c6c8 insns.dat: Add PKU instructions
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2015-07-26 15:32:59 +03:00
Henrik Gramner
e7072c4148 insns.dat: Fix 256-bit vmovntps
Signed-off-by: Henrik Gramner <henrik@gramner.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2014-11-30 00:21:17 +03:00
Mark Charney
dcaef4b095 Sync to public Intel EAS version 021.
* http://www.intel.com/software/isa

   * Signed-off-by: Mark Charney <mark.charney@intel.com>
2014-10-16 16:31:31 -07:00
H. Peter Anvin
727eb3f8f6 Add CLFLUSHOPT instruction
Add the CLFLUSHOPT instruction from the Intel Instruction Set
Architecture Extensions document version 319433-018 (Feb 2014).

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2014-02-19 15:40:53 -08:00
H. Peter Anvin
0b7db57deb insns: add XSAVEC, XSAVES and XRSTORS instructions
Add the XSAVEC, XSAVES, and XRSTORS instructions from the Intel SDM
release 253665-050US (Feb 2014).

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2014-02-19 14:58:42 -08:00
H. Peter Anvin
1eef781594 BR 3392275: Don't require xmm0 to be specified when implicit
BR 3392275 complains about xmm0 having to be explicitly included in
the assembly syntax when it is implicit in the encoding.  In the
interest of "be liberal in what you accept", accept either form in the
input.

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2014-02-16 10:25:25 -08:00
Jin Kyu Song
b0c729baeb mpx: Clean up instruction data
Cleaned up unneccessary size specifiers in the instruction data.

Signed-off-by: Jin Kyu Song <jin.kyu.song@intel.com>
2013-12-18 22:37:36 -08:00
Cyrill Gorcunov
0b900cc7e1 insns: Mark LOADALL, LOADALL286 with ND flag
Otherwise disassembler treat syscall, sysret incorrectly.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2013-12-13 11:00:43 +04:00
H. Peter Anvin
54c7711858 insns.dat: Fix a typo in a comment
isnsn-iflags.pl not insns-iflag.pl.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2013-11-24 17:07:33 -08:00
H. Peter Anvin
9a1db45895 iflag: Move instruction flag comment
Move the instruction flag comment to the Perl file where they are
defined.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2013-11-24 11:53:38 -08:00
Cyrill Gorcunov
ea882d0b59 insns: Restore back MMX,FPU flags
In commit 9bb987d8e0
we had to drop some flags due to flags type used
in nasm code.

Since now flags internal structure is reworked, we
can restore them back.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2013-11-24 13:21:04 +04:00
Jin Kyu Song
305f3cee04 bnd: Drop bnd prefix for relaxed short jmp instructions
Reverted the redundant branch instruction patterns for bnd prefix.
And when a relaxed jmp instruction becomes a short (Jb) form,
bnd prefix is not needed because it does not initialize bnd registers.
So in that case, bnd prefix is silently dropped.

BND JMP foo       -> drops bnd prefix
BND JMP short foo -> shows an explicit error

Signed-off-by: Jin Kyu Song <jin.kyu.song@intel.com>
2013-11-22 11:59:14 -08:00
Jin Kyu Song
4a8dc019ef disasm: Add basic AVX512 support
Disassembler can translate EVEX prefix, count up to 32 vector registers
and recognize new ZMM / opmask registers.

Signed-off-by: Jin Kyu Song <jin.kyu.song@intel.com>
2013-11-20 11:29:42 -08:00
Jin Kyu Song
267d0af79c PREFETCHWT1: Add a new instruction flag
PREFETCHWT1 instruction's CPUID was TBD before.
Now it has its new CPUID bit : PREFETCHWT1

Signed-off-by: Jin Kyu Song <jin.kyu.song@intel.com>
2013-11-20 11:29:42 -08:00
Jin Kyu Song
22b1f082bd AVX512: Update instruction group
CPUID bit for vptestnm[dq] changed.
vptestnm[dq]: AVX512CD -> AVX512F

Signed-off-by: Jin Kyu Song <jin.kyu.song@intel.com>
2013-11-20 11:29:42 -08:00
Jin Kyu Song
b4e1ae18e2 MPX: Move BND prefix indication from bytecode to iflags
As BND prefix validity check conflicts with jcc8 prefix,
IF_BND is added for the instruction templates which can have
bnd prefix for preserving the content of bound register.

Signed-off-by: Jin Kyu Song <jin.kyu.song@intel.com>
2013-11-20 11:29:42 -08:00
Jin Kyu Song
da1a5cd514 SHA: Add SHA instructions
New instruction extensions of SHA family are added.

Signed-off-by: Jin Kyu Song <jin.kyu.song@intel.com>
2013-11-20 11:29:42 -08:00
Jin Kyu Song
0304109b3d MPX: Add BND prefix for branch instructions
BND prefix is used for adding bounds checking protection
across flow control changes such as call, ret, jmp and jcc calls.

Signed-off-by: Jin Kyu Song <jin.kyu.song@intel.com>
2013-11-20 11:29:42 -08:00
Jin Kyu Song
164d60740f MPX: Add MPX instructions
Added MPX instructions and corresponding parser and encoder.

ICC style mib - base + disp and index are separate - is supported.
E.g. bndstx [ebx+3], bnd2, edx -> ebx+3 : base+disp, edx : index

As a supplement to NASM style mib - split EA - parser,
omitted base+disp is now treated as 0 displacement.
E.g. bndstx [,edx], bnd2 -> bndstx [0,edx], bnd2

Signed-off-by: Jin Kyu Song <jin.kyu.song@intel.com>
2013-11-20 11:29:41 -08:00
H. Peter Anvin
9d5461069d Add support for DZ and RESZ, document the ZWORD keyword
Add the DZ and RESZ pseudoinstructions and add ZWORD to the
documentation.

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2013-10-02 18:28:49 -07:00
Jin Kyu Song
eb595942b2 AVX-512: Added AVX-512PF instructions
Added Prefetch (AVX-512PF) instructions.
These instructions are supported
if CPUID.(EAX=07H, ECX=0):EBX.AVX512PF[bit 26] = 1.
CPUID feature flag for PREFETCHWT1 is TBD
but PREFETCHWT1 is included in this commit.

Signed-off-by: Jin Kyu Song <jin.kyu.song@intel.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2013-09-14 01:27:10 +04:00
Jin Kyu Song
dd1c0c13c8 AVX-512: Add AVX-512ER instructions
Added Exponential and Reciprocal (AVX-512ER) instructions.
These instructions are supported
if CPUID.(EAX=07H, ECX=0):EBX.AVX512ER[bit 27] = 1.
IF_AVX512 is now shared by all AVX-512* instructions as a bit mask.

Signed-off-by: Jin Kyu Song <jin.kyu.song@intel.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2013-09-14 01:27:06 +04:00
Jin Kyu Song
d4b2b5f17c AVX-512: Add AVX-512CD instructions
Added Conflict Detection (AVX-512CD) instructions.
These instructions are supported
if CPUID.(EAX=07H, ECX=0):EBX.AVX512CD[bit 28] = 1.

Signed-off-by: Jin Kyu Song <jin.kyu.song@intel.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2013-09-14 01:27:02 +04:00
Jin Kyu Song
c257bb6ae0 AVX-512: Add Pseudo-ops for CMP instructions
Added three-operand pseudo-ops for VCMPPD, VPCMPD and so on.
Test case is also updated to validate them.

Signed-off-by: Jin Kyu Song <jin.kyu.song@intel.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2013-09-07 11:50:39 +04:00
Jin Kyu Song
4f14a4b9ed AVX-512: Reorder instructions in insns.dat
Within a same instruction mnemonic, instructions are reordered
in order of opcode byte value.
Therefore when there are two possible opcode candidates, smaller
opcode is picked now.
e.g.) vmovapd zmm30, zmm29 -> now 28h is used. 29h previously

Signed-off-by: Jin Kyu Song <jin.kyu.song@intel.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2013-09-07 11:50:18 +04:00
Jin Kyu Song
79d39748b0 AVX-512: Add OPMASK instructions
Added opmask instructions (kandw and etc). Defined KREG and RM_K
aliasing RM_OPMASK and OPMASKREG respectively to make insns.dat
look neat.

Signed-off-by: Jin Kyu Song <jin.kyu.song@intel.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2013-08-29 10:03:24 +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
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
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
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
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
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
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