LLVM API Documentation

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Macros | 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
 

Macros

#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 XOP8_MAP_SYM   x86DisassemblerXOP8Opcodes
 
#define XOP9_MAP_SYM   x86DisassemblerXOP9Opcodes
 
#define XOPA_MAP_SYM   x86DisassemblerXOPAOpcodes
 
#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 XOP8_MAP_STR   "x86DisassemblerXOP8Opcodes"
 
#define XOP9_MAP_STR   "x86DisassemblerXOP9Opcodes"
 
#define XOPA_MAP_STR   "x86DisassemblerXOPAOpcodes"
 
#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, XOP8_MAP = 6, XOP9_MAP = 7,
  XOPA_MAP = 8
}
 
enum  ModRMDecisionType { MODRM_max }
 
enum  OperandEncoding { ENCODING_max }
 
enum  OperandType { TYPE_max }
 
enum  ModifierType { MODIFIER_max }
 
enum  DisassemblerMode { MODE_16BIT, MODE_32BIT, MODE_64BIT }
 

Macro Definition 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)
#define ENUM_ENTRY(n, v)

Definition at line 56 of file X86DisassemblerDecoderCommon.h.

#define CONTEXTS_STR   "x86DisassemblerContexts"

Definition at line 40 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_WRITEMASK, "Register operand in EVEX.aaa 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")
#define ENUM_ENTRY(n, v)

Definition at line 377 of file X86DisassemblerDecoderCommon.h.

#define ENUM_ENTRY (   n,
 
)    n = v,

Definition at line 525 of file X86DisassemblerDecoderCommon.h.

#define ENUM_ENTRY (   n,
  r,
 
)    n,

Definition at line 525 of file X86DisassemblerDecoderCommon.h.

#define ENUM_ENTRY (   n)    n,

Definition at line 525 of file X86DisassemblerDecoderCommon.h.

#define ENUM_ENTRY (   n,
 
)    n,

Definition at line 525 of file X86DisassemblerDecoderCommon.h.

#define ENUM_ENTRY (   n,
 
)    n,

Definition at line 525 of file X86DisassemblerDecoderCommon.h.

#define ENUM_ENTRY (   n)    n,

Definition at line 525 of file X86DisassemblerDecoderCommon.h.

#define INSTRUCTION_CONTEXTS

Definition at line 81 of file X86DisassemblerDecoderCommon.h.

#define INSTRUCTIONS_STR   "x86DisassemblerInstrSpecifiers"

Definition at line 39 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)
#define ENUM_ENTRY(n, v)

Definition at line 520 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)
#define ENUM_ENTRY(n, v)

Definition at line 328 of file X86DisassemblerDecoderCommon.h.

#define ONEBYTE_STR   "x86DisassemblerOneByteOpcodes"

Definition at line 41 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 43 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 44 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 45 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 46 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 42 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 419 of file X86DisassemblerDecoderCommon.h.

#define X86_MAX_OPERANDS   5

Definition at line 532 of file X86DisassemblerDecoderCommon.h.

Referenced by readOperands(), and translateInstruction().

#define XOP8_MAP_STR   "x86DisassemblerXOP8Opcodes"

Definition at line 47 of file X86DisassemblerDecoderCommon.h.

#define XOP8_MAP_SYM   x86DisassemblerXOP8Opcodes

Definition at line 35 of file X86DisassemblerDecoderCommon.h.

Referenced by decode(), and modRMRequired().

#define XOP9_MAP_STR   "x86DisassemblerXOP9Opcodes"

Definition at line 48 of file X86DisassemblerDecoderCommon.h.

#define XOP9_MAP_SYM   x86DisassemblerXOP9Opcodes

Definition at line 36 of file X86DisassemblerDecoderCommon.h.

Referenced by decode(), and modRMRequired().

#define XOPA_MAP_STR   "x86DisassemblerXOPAOpcodes"

Definition at line 49 of file X86DisassemblerDecoderCommon.h.

#define XOPA_MAP_SYM   x86DisassemblerXOPAOpcodes

Definition at line 37 of file X86DisassemblerDecoderCommon.h.

Referenced by decode(), and modRMRequired().

Typedef Documentation

typedef uint16_t InstrUID

Definition at line 307 of file X86DisassemblerDecoderCommon.h.

Enumeration Type Documentation

Enumerator
ATTR_max 

Definition at line 68 of file X86DisassemblerDecoderCommon.h.

Enumerator
MODE_16BIT 
MODE_32BIT 
MODE_64BIT 

Definition at line 551 of file X86DisassemblerDecoderCommon.h.

Enumerator
IC_max 

Definition at line 275 of file X86DisassemblerDecoderCommon.h.

Enumerator
MODIFIER_max 

Definition at line 526 of file X86DisassemblerDecoderCommon.h.

Enumerator
MODRM_max 

Definition at line 336 of file X86DisassemblerDecoderCommon.h.

enum OpcodeType
Enumerator
ONEBYTE 
TWOBYTE 
THREEBYTE_38 
THREEBYTE_3A 
THREEBYTE_A6 
THREEBYTE_A7 
XOP8_MAP 
XOP9_MAP 
XOPA_MAP 

Definition at line 285 of file X86DisassemblerDecoderCommon.h.

Enumerator
ENCODING_max 

Definition at line 409 of file X86DisassemblerDecoderCommon.h.

Enumerator
TYPE_max 

Definition at line 500 of file X86DisassemblerDecoderCommon.h.