Commit Graph

10 Commits

Author SHA1 Message Date
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
Cyrill Gorcunov
f8d12d5011 insns-iflags: Drop occasionally introduced \Tab's
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2013-12-07 16:15:03 +04:00
H. Peter Anvin
621a69ac5c Add {vex3} and {vex2} prefixes by analogy with {evex}
Allow specifying {vex3} or {vex2} (the latter is currently always
redundant, unless we end up with instructions at some point can be
specified with legacy prefixes or VEX) to select a specific encoding
of VEX-encoded instructions.

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2013-11-28 12:21:11 -08:00
Jin Kyu Song
6cfa968e8d iflags: Add IF_EVEX for checking {evex} availability
For checking the availability of {evex} prefix, AVX512 iflag
has been used. But this is a flag for an instruction set
not for an encoding scheme. And there are some AVX512 instructions
encoded with VEX prefix.

So a new instruction flag (IF_EVEX) is added for the instructions
which are actually encoded with EVEX prefix.

This flag is automatically added by insns.pl, so no need to add manually
in insns.dat.

Signed-off-by: Jin Kyu Song <jin.kyu.song@intel.com>
2013-11-27 15:43:33 -08:00
H. Peter Anvin
80d18b5555 iflag: In iflag_cmp() scan from the most significant word down
In order for iflag_cmp() to return an ordering that makes sense, we
need to scan from the most significant word downward.  That way the
bits with the higher index consistently are the more significant.

This fixes the disassembler vendor selection algorithm.  While we are
doing that, make that dependency more explicit in the comments.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2013-11-26 15:21:15 -08:00
H. Peter Anvin
af90d3520f iflag: Make the insns_flags array const
Make the insns_flags array const, and change the helper functions to
match.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2013-11-24 17:13:20 -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
H. Peter Anvin
8b0e5a34fc iflag: remove C99 constructs, don't hardcode the number of words
Avoid using C99 constructs when not necessary.  Don't hardcode the
number of words when we can autodiscover them.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2013-11-24 11:49:24 -08:00
H. Peter Anvin
45a22d9a61 iflag: Fix dependencies, factor out static components of iflag.h
Multi-dependencies don't work as expected, especially not across Make
versions, this is why we don't use them and read the instructions list
multiple times.

iflag.h has a lot of static content, so factor out the static content.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2013-11-24 11:13:10 -08:00
Cyrill Gorcunov
d4e51d3e71 insns: Introduce insns-flags.pl
It been found that 64 bits for instruction flags is too small,
so instead we start using indirect addressing scheme to keep
instruction flags in bitvectors instead.

Using one bitvector per instruction template entry is wastefull
(especially if vector grow in future, at moment it's 128 bit length),
so we use indirect addressing, which is generated as follow

 - read instruction flags from insns.dat
 - flag sequence sorted and joined into one key string
 - this key string become a hash index
 - all hash entries are compacted into one array
 - every instruction template uses array offset instead
   of flags bitfield

Just for info, at moment we have 195 unique flags combination,
but since instruction template will use index as unsigned
integer, we can use a way more wider combination of flags
in future.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2013-11-24 13:20:52 +04:00