Commit Graph

27 Commits

Author SHA1 Message Date
H. Peter Anvin
ed8df3eaef Remove "high 16" register class macros for xmm/ymm/zmm
The "high 16" register class macros were actually incorrect, as they
simply aliased the corresponding whole set class.  In oder to keep
someone from getting confused and making mistakes, remove them.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2013-11-28 11:35:34 -08:00
Jin Kyu Song
08ae610ec9 opflags: Separate vector registers into low-16 and high-16
Since only EVEX supports all 32 vector registers encoding for now,
VEX/REX encoded instructions should not take high-16 registers as operands.

This filtering had been done using instruction flag so far, but
using the opflags makes more sense.

[XYZ]MMREG operands used for non-EVEX instructions are automatically
converted to [XYZ]MM_L16 in insns.pl

Signed-off-by: Jin Kyu Song <jin.kyu.song@intel.com>
2013-11-27 15:43:32 -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
Jin Kyu Song
daafcbae77 AVX-512: Remove trailing space and align columns
Cosmetic change

Signed-off-by: Jin Kyu Song <jin.kyu.song@intel.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2013-08-29 10:03:28 +04:00
Jin Kyu Song
6d16d2836d AVX-512: Fix comments
Fixed or purged some old comments and added a comment for a previous patch.

Signed-off-by: Jin Kyu Song <jin.kyu.song@intel.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2013-08-29 10:03:09 +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
Ben Rudiak-Gould
d1ac29a3cc insns: Remove pushseg/popseg internal bytecodes
This patch is getting rid of the following bytecodes
'pushseg','popseg','pushseg2','popseg2' and simplifies
overall code.

[gorcunov@: a few style fixes]
Signed-off-by: Ben Rudiak-Gould <benrudiak@gmail.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2013-03-03 20:50:46 +04:00
H. Peter Anvin
6373d98cf4 Add copyright notices to other *.dat files
Add copyright notices to the other *.dat files.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2009-06-28 16:58:10 -07:00
H. Peter Anvin
4c2529dd77 Fix register numbers for ymm1-15!
ymm1-15 were incorrectly listed as starting at register number 0, with
obviously disastrous consequences...
2008-05-26 19:23:01 -07:00
H. Peter Anvin
ee7fc29a30 Add support for ymm0 in instructions
Make it possible to use ymm0 as a fixed operand in instructions
2008-05-20 16:47:12 -07:00
H. Peter Anvin
7117e80702 Initial support for YMM (AVX) registers
Add support for ymm0..15 registers, and the "ymmreg" qualifier.
No support yet for "yword" or "dy".
2008-04-21 22:44:55 -04:00
H. Peter Anvin
aff9c93aa4 Fix handling of XCHG in 64-bit mode
The handling of XCHG in 64-bit mode somewhat broken.  Add a register
flag for "not accumulator", so we can generate all the appropriate
modes.
2007-11-12 20:18:05 -08:00
H. Peter Anvin
cb9b690ae6 Add (untested!) SSSE3, SSE4.1, SSE4.2 instructions
Add the SSSE3, SSE4.1 and SSE4.2 instruction sets.  Change \332 to be
a literal 0xF2 prefix, by analog with \333 for 0xF3 prefix (the
previous \332 flag changed to \335).  This is necessary to get the REX
prefix in the right place for instructions that use it.

We are going to have to go in and change existing instruction patterns
which use these, as well.
2007-09-12 21:58:51 -07:00
H. Peter Anvin
d105682096 Remove $Id$ tags (useless with git)
Remove CVS $Id$ tags, since git doesn't use them.
2007-09-12 21:05:06 -07:00
H. Peter Anvin
99c4ecd18f Implement REL/ABS modifiers
Implement "REL" and "ABS" modifiers for offsets in 64-bit mode.  This
replaces "rip+XXX" type addressing.  The infrastructure to set the default
mode is there, but there is nothing to throw the switch just yet.
2007-08-28 23:06:00 +00:00
H. Peter Anvin
85f5f148bb regs.pl: handle dashed sequences with suffixes
Handle dashed sequences with suffixes.  Use that for r8-r15[bwd].
2007-08-20 21:03:14 +00:00
H. Peter Anvin
3df97a7270 Get rid of magic open-coded "register numbers"
Get rid of magic open-coded register numbers.  We now keep track of
a total of three different kinds of register numbers: the register
enumeration (regs.h), the x86 register value, and the register flags.
That has all the information we need.

Additionally, do massive revamping of the EA generation code and the
REX generation logic.
2007-05-30 03:25:21 +00:00
H. Peter Anvin
edb1428239 More cleanup of operand flags/register classes 2007-05-30 00:05:00 +00:00
H. Peter Anvin
fb658ae61b regs.dat: fix comment 2007-05-15 04:33:43 +00:00
Keith Kanios
76a83979d8 Filled in all RIP Register Flags. 2007-04-16 13:54:49 +00:00
H. Peter Anvin
88aa185d36 Use + instead of * for extension; it feels cleaner with the new meaning.
We used to use * to mean substitute in 0-7.  Now it means that it should
be incremented 8 times.  Using a different character feels cleaner.
2007-04-16 01:21:29 +00:00
H. Peter Anvin
99f309cc07 Clean up the 64-bitification of regs.dat for 64-bit ndisasm support
64-bit support required some major changes to regs.dat; clean some of
it up (re-introduce patterns, where appropriate) and allow a single
register to belong to multiple disassembly classes; also keep track
of the x86 register number again.
2007-04-15 23:12:17 +00:00
H. Peter Anvin
6303c87c45 Fix the register number for CR7 (it was using the same number as CR15). 2007-04-15 05:40:43 +00:00
Keith Kanios
b7a89544d0 General push for x86-64 support, dubbed 0.99.00. 2007-04-12 02:40:54 +00:00
H. Peter Anvin
10101f26bc Add support for the new instructions in Prescott 2003-02-24 23:22:45 +00:00
H. Peter Anvin
232badbbbc This is the "megapatch":
a) Automatically generate dependencies for all Makefiles;
b) Move register definitions to a separate .dat file;
c) Add support for "unimplemented but there in theory" registers.
2002-06-06 02:41:20 +00:00