LLVM API Documentation

Classes | Defines | Typedefs | Enumerations
X86DisassemblerDecoderCommon.h File Reference
#include "llvm/Support/DataTypes.h"
Include dependency graph for X86DisassemblerDecoderCommon.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  ModRMDecision
struct  OpcodeDecision
struct  ContextDecision
struct  OperandSpecifier
struct  InstructionSpecifier

Defines

#define INSTRUCTIONS_SYM   x86DisassemblerInstrSpecifiers
#define CONTEXTS_SYM   x86DisassemblerContexts
#define ONEBYTE_SYM   x86DisassemblerOneByteOpcodes
#define TWOBYTE_SYM   x86DisassemblerTwoByteOpcodes
#define THREEBYTE38_SYM   x86DisassemblerThreeByte38Opcodes
#define THREEBYTE3A_SYM   x86DisassemblerThreeByte3AOpcodes
#define THREEBYTEA6_SYM   x86DisassemblerThreeByteA6Opcodes
#define THREEBYTEA7_SYM   x86DisassemblerThreeByteA7Opcodes
#define INSTRUCTIONS_STR   "x86DisassemblerInstrSpecifiers"
#define CONTEXTS_STR   "x86DisassemblerContexts"
#define ONEBYTE_STR   "x86DisassemblerOneByteOpcodes"
#define TWOBYTE_STR   "x86DisassemblerTwoByteOpcodes"
#define THREEBYTE38_STR   "x86DisassemblerThreeByte38Opcodes"
#define THREEBYTE3A_STR   "x86DisassemblerThreeByte3AOpcodes"
#define THREEBYTEA6_STR   "x86DisassemblerThreeByteA6Opcodes"
#define THREEBYTEA7_STR   "x86DisassemblerThreeByteA7Opcodes"
#define ATTRIBUTE_BITS
#define ENUM_ENTRY(n, v)   n = v,
#define INSTRUCTION_CONTEXTS
#define ENUM_ENTRY(n, r, d)   n,
#define MODRMTYPES
#define ENUM_ENTRY(n)   n,
#define ENCODINGS
#define ENUM_ENTRY(n, d)   n,
#define TYPES
#define ENUM_ENTRY(n, d)   n,
#define MODIFIER_TYPES
#define ENUM_ENTRY(n)   n,
#define X86_MAX_OPERANDS   5

Typedefs

typedef uint16_t InstrUID

Enumerations

enum  attributeBits { ATTR_max }
enum  InstructionContext { IC_max }
enum  OpcodeType {
  ONEBYTE = 0, TWOBYTE = 1, THREEBYTE_38 = 2, THREEBYTE_3A = 3,
  THREEBYTE_A6 = 4, THREEBYTE_A7 = 5
}
enum  ModRMDecisionType { MODRM_max }
enum  OperandEncoding { ENCODING_max }
enum  OperandType { TYPE_max }
enum  ModifierType { MODIFIER_max }
enum  DisassemblerMode { MODE_16BIT, MODE_32BIT, MODE_64BIT }

Define Documentation

#define ATTRIBUTE_BITS
Value:
ENUM_ENTRY(ATTR_NONE,   0x00) \
  ENUM_ENTRY(ATTR_64BIT,  0x01) \
  ENUM_ENTRY(ATTR_XS,     0x02) \
  ENUM_ENTRY(ATTR_XD,     0x04) \
  ENUM_ENTRY(ATTR_REXW,   0x08) \
  ENUM_ENTRY(ATTR_OPSIZE, 0x10) \
  ENUM_ENTRY(ATTR_ADSIZE, 0x20) \
  ENUM_ENTRY(ATTR_VEX,    0x40) \
  ENUM_ENTRY(ATTR_VEXL,   0x80)

Definition at line 50 of file X86DisassemblerDecoderCommon.h.

#define CONTEXTS_STR   "x86DisassemblerContexts"

Definition at line 37 of file X86DisassemblerDecoderCommon.h.

#define CONTEXTS_SYM   x86DisassemblerContexts

Definition at line 28 of file X86DisassemblerDecoderCommon.h.

Referenced by contextForAttrs().

#define ENCODINGS
Value:
ENUM_ENTRY(ENCODING_NONE,   "")                                              \
  ENUM_ENTRY(ENCODING_REG,    "Register operand in ModR/M byte.")              \
  ENUM_ENTRY(ENCODING_RM,     "R/M operand in ModR/M byte.")                   \
  ENUM_ENTRY(ENCODING_VVVV,   "Register operand in VEX.vvvv byte.")            \
  ENUM_ENTRY(ENCODING_CB,     "1-byte code offset (possible new CS value)")    \
  ENUM_ENTRY(ENCODING_CW,     "2-byte")                                        \
  ENUM_ENTRY(ENCODING_CD,     "4-byte")                                        \
  ENUM_ENTRY(ENCODING_CP,     "6-byte")                                        \
  ENUM_ENTRY(ENCODING_CO,     "8-byte")                                        \
  ENUM_ENTRY(ENCODING_CT,     "10-byte")                                       \
  ENUM_ENTRY(ENCODING_IB,     "1-byte immediate")                              \
  ENUM_ENTRY(ENCODING_IW,     "2-byte")                                        \
  ENUM_ENTRY(ENCODING_ID,     "4-byte")                                        \
  ENUM_ENTRY(ENCODING_IO,     "8-byte")                                        \
  ENUM_ENTRY(ENCODING_RB,     "(AL..DIL, R8L..R15L) Register code added to "   \
                              "the opcode byte")                               \
  ENUM_ENTRY(ENCODING_RW,     "(AX..DI, R8W..R15W)")                           \
  ENUM_ENTRY(ENCODING_RD,     "(EAX..EDI, R8D..R15D)")                         \
  ENUM_ENTRY(ENCODING_RO,     "(RAX..RDI, R8..R15)")                           \
  ENUM_ENTRY(ENCODING_I,      "Position on floating-point stack added to the " \
                              "opcode byte")                                   \
                                                                               \
  ENUM_ENTRY(ENCODING_Iv,     "Immediate of operand size")                     \
  ENUM_ENTRY(ENCODING_Ia,     "Immediate of address size")                     \
  ENUM_ENTRY(ENCODING_Rv,     "Register code of operand size added to the "    \
                              "opcode byte")                                   \
  ENUM_ENTRY(ENCODING_DUP,    "Duplicate of another operand; ID is encoded "   \
                              "in type")

Definition at line 222 of file X86DisassemblerDecoderCommon.h.

#define ENUM_ENTRY (   n,
 
)    n = v,

Definition at line 366 of file X86DisassemblerDecoderCommon.h.

#define ENUM_ENTRY (   n,
  r,
 
)    n,

Definition at line 366 of file X86DisassemblerDecoderCommon.h.

#define ENUM_ENTRY (   n)    n,

Definition at line 366 of file X86DisassemblerDecoderCommon.h.

#define ENUM_ENTRY (   n,
 
)    n,

Definition at line 366 of file X86DisassemblerDecoderCommon.h.

#define ENUM_ENTRY (   n,
 
)    n,

Definition at line 366 of file X86DisassemblerDecoderCommon.h.

#define ENUM_ENTRY (   n)    n,

Definition at line 366 of file X86DisassemblerDecoderCommon.h.

#define INSTRUCTION_CONTEXTS

Definition at line 75 of file X86DisassemblerDecoderCommon.h.

#define INSTRUCTIONS_STR   "x86DisassemblerInstrSpecifiers"

Definition at line 36 of file X86DisassemblerDecoderCommon.h.

#define INSTRUCTIONS_SYM   x86DisassemblerInstrSpecifiers

Definition at line 27 of file X86DisassemblerDecoderCommon.h.

Referenced by specifierForUID().

#define MODIFIER_TYPES
Value:
ENUM_ENTRY(MODIFIER_NONE)   \
  ENUM_ENTRY(MODIFIER_OPCODE) \
  ENUM_ENTRY(MODIFIER_MODRM)

Definition at line 361 of file X86DisassemblerDecoderCommon.h.

#define MODRMTYPES
Value:
ENUM_ENTRY(MODRM_ONEENTRY)  \
  ENUM_ENTRY(MODRM_SPLITRM)   \
  ENUM_ENTRY(MODRM_SPLITMISC)  \
  ENUM_ENTRY(MODRM_SPLITREG)  \
  ENUM_ENTRY(MODRM_FULL)

Definition at line 173 of file X86DisassemblerDecoderCommon.h.

#define ONEBYTE_STR   "x86DisassemblerOneByteOpcodes"

Definition at line 38 of file X86DisassemblerDecoderCommon.h.

#define ONEBYTE_SYM   x86DisassemblerOneByteOpcodes

Definition at line 29 of file X86DisassemblerDecoderCommon.h.

Referenced by decode(), and modRMRequired().

#define THREEBYTE38_STR   "x86DisassemblerThreeByte38Opcodes"

Definition at line 40 of file X86DisassemblerDecoderCommon.h.

#define THREEBYTE38_SYM   x86DisassemblerThreeByte38Opcodes

Definition at line 31 of file X86DisassemblerDecoderCommon.h.

Referenced by decode(), and modRMRequired().

#define THREEBYTE3A_STR   "x86DisassemblerThreeByte3AOpcodes"

Definition at line 41 of file X86DisassemblerDecoderCommon.h.

#define THREEBYTE3A_SYM   x86DisassemblerThreeByte3AOpcodes

Definition at line 32 of file X86DisassemblerDecoderCommon.h.

Referenced by decode(), and modRMRequired().

#define THREEBYTEA6_STR   "x86DisassemblerThreeByteA6Opcodes"

Definition at line 42 of file X86DisassemblerDecoderCommon.h.

#define THREEBYTEA6_SYM   x86DisassemblerThreeByteA6Opcodes

Definition at line 33 of file X86DisassemblerDecoderCommon.h.

Referenced by decode(), and modRMRequired().

#define THREEBYTEA7_STR   "x86DisassemblerThreeByteA7Opcodes"

Definition at line 43 of file X86DisassemblerDecoderCommon.h.

#define THREEBYTEA7_SYM   x86DisassemblerThreeByteA7Opcodes

Definition at line 34 of file X86DisassemblerDecoderCommon.h.

Referenced by decode(), and modRMRequired().

#define TWOBYTE_STR   "x86DisassemblerTwoByteOpcodes"

Definition at line 39 of file X86DisassemblerDecoderCommon.h.

#define TWOBYTE_SYM   x86DisassemblerTwoByteOpcodes

Definition at line 30 of file X86DisassemblerDecoderCommon.h.

Referenced by decode(), and modRMRequired().

#define TYPES

Definition at line 263 of file X86DisassemblerDecoderCommon.h.

#define X86_MAX_OPERANDS   5

Definition at line 373 of file X86DisassemblerDecoderCommon.h.

Referenced by readOperands(), and translateInstruction().


Typedef Documentation

typedef uint16_t InstrUID

Definition at line 152 of file X86DisassemblerDecoderCommon.h.


Enumeration Type Documentation

Enumerator:
ATTR_max 

Definition at line 62 of file X86DisassemblerDecoderCommon.h.

Enumerator:
MODE_16BIT 
MODE_32BIT 
MODE_64BIT 

Definition at line 392 of file X86DisassemblerDecoderCommon.h.

Enumerator:
IC_max 

Definition at line 123 of file X86DisassemblerDecoderCommon.h.

Enumerator:
MODIFIER_max 

Definition at line 367 of file X86DisassemblerDecoderCommon.h.

Enumerator:
MODRM_max 

Definition at line 181 of file X86DisassemblerDecoderCommon.h.

enum OpcodeType
Enumerator:
ONEBYTE 
TWOBYTE 
THREEBYTE_38 
THREEBYTE_3A 
THREEBYTE_A6 
THREEBYTE_A7 

Definition at line 133 of file X86DisassemblerDecoderCommon.h.

Enumerator:
ENCODING_max 

Definition at line 253 of file X86DisassemblerDecoderCommon.h.

Enumerator:
TYPE_max 

Definition at line 341 of file X86DisassemblerDecoderCommon.h.