NS_x86 Namespace Reference

Data Structures

struct  modRMByte
struct  sIBByte
class  ia32_prefixes
struct  ia32_memacc
struct  ia32_condition
struct  ia32_operand
struct  ia32_entry
struct  flagInfo
class  ia32_instruction
class  instruction

Typedefs

typedef char byte_t
typedef short word_t
typedef int dword_t

Enumerations

enum  AMD64_REG_NUMBERS {
  REGNUM_RAX = 0, REGNUM_RCX, REGNUM_RDX, REGNUM_RBX,
  REGNUM_RSP, REGNUM_RBP, REGNUM_RSI, REGNUM_RDI,
  REGNUM_R8, REGNUM_R9, REGNUM_R10, REGNUM_R11,
  REGNUM_R12, REGNUM_R13, REGNUM_R14, REGNUM_R15,
  REGNUM_DUMMYFPR, REGNUM_OF, REGNUM_SF, REGNUM_ZF,
  REGNUM_AF, REGNUM_PF, REGNUM_CF, REGNUM_TF,
  REGNUM_IF, REGNUM_DF, REGNUM_NT, REGNUM_RF,
  REGNUM_MM0, REGNUM_MM1, REGNUM_MM2, REGNUM_MM3,
  REGNUM_MM4, REGNUM_MM5, REGNUM_MM6, REGNUM_MM7,
  REGNUM_XMM0, REGNUM_XMM1, REGNUM_XMM2, REGNUM_XMM3,
  REGNUM_XMM4, REGNUM_XMM5, REGNUM_XMM6, REGNUM_XMM7,
  REGNUM_XMM8, REGNUM_XMM9, REGNUM_XMM10, REGNUM_XMM11,
  REGNUM_XMM12, REGNUM_XMM13, REGNUM_XMM14, REGNUM_XMM15,
  REGNUM_EFLAGS, REGNUM_IGNORED
}
enum  { RepGroup = 0 }
enum  {
  am_A = 1, am_C, am_D, am_E,
  am_F, am_G, am_I, am_J,
  am_M, am_O, am_P, am_Q,
  am_R, am_S, am_T, am_U,
  am_UM, am_V, am_W, am_X,
  am_Y, am_reg, am_stackH, am_stackP,
  am_allgprs, am_VR, am_tworeghack, am_ImplImm,
  am_RM
}
enum  {
  op_a = 1, op_b, op_c, op_d,
  op_dq, op_p, op_pd, op_pi,
  op_ps, op_q, op_s, op_sd,
  op_ss, op_si, op_v, op_w,
  op_y, op_z, op_lea, op_allgprs,
  op_512, op_f, op_dbl, op_14,
  op_28, op_edxeax, op_ecxebx
}
enum  {
  t_ill = 0, t_oneB, t_twoB, t_threeB,
  t_threeB2, t_prefixedSSE, t_coprocEsc, t_grp,
  t_sse, t_sse_bis, t_sse_ter, t_grpsse,
  t_3dnow, t_done = 99
}
enum  {
  mRAX = 0, mRCX, mRDX, mRBX,
  mRSP, mRBP, mRSI, mRDI,
  mR8, mR9, mR10, mR11,
  mR12, mR13, MR14, mR15,
  mRIP
}
enum  {
  mEAX = 0, mECX, mEDX, mEBX,
  mESP, mEBP, mESI, mEDI
}
enum  {
  mAX = 0, mCX, mDX, mBX,
  mSP, mBP, mSI, mDI
}
enum  {
  sNONE = 0, s1R, s1W, s1RW,
  s1R2R, s1W2R, s1RW2R, s1RW2RW,
  s1W2R3R, s1W2W3R, s1W2RW3R, s1R2RW,
  s1W2RW, s1W2R3RW, s1RW2R3R, s1RW2RW3R,
  s1R2R3R
}
enum  sizehacks {
  shREP = 1, shREPECMPS, shREPESCAS, shREPNECMPS,
  shREPNESCAS
}
enum  dynamic_call_address_mode {
  REGISTER_DIRECT, REGISTER_INDIRECT, REGISTER_INDIRECT_DISPLACED, SIB,
  DISPLACED, IP_INDIRECT_DISPLACED
}
enum  {
  Grp1a = 0, Grp1b, Grp1c, Grp1d,
  Grp2, Grp3a, Grp3b, Grp4,
  Grp5, Grp6, Grp7, Grp8,
  Grp9, Grp11, Grp12, Grp13,
  Grp14, Grp15, Grp16, Grp17,
  GrpAMD
}
enum  {
  SSE10 = 0, SSE11, SSE12, SSE13,
  SSE14, SSE15, SSE16, SSE17,
  SSE28, SSE29, SSE2A, SSE2B,
  SSE2C, SSE2D, SSE2E, SSE2F,
  SSE50, SSE51, SSE52, SSE53,
  SSE54, SSE55, SSE56, SSE57,
  SSE58, SSE59, SSE5A, SSE5B,
  SSE5C, SSE5D, SSE5E, SSE5F,
  SSE60, SSE61, SSE62, SSE63,
  SSE64, SSE65, SSE66, SSE67,
  SSE68, SSE69, SSE6A, SSE6B,
  SSE6C, SSE6D, SSE6E, SSE6F,
  SSE70, SSE74, SSE75, SSE76,
  SSE78, SSE79, SSE7C, SSE7D,
  SSE7E, SSE7F, SSEB8, SSEC2,
  SSEC4, SSEC5, SSEC6, SSED0,
  SSED1, SSED2, SSED3, SSED4,
  SSED5, SSED6, SSED7, SSED8,
  SSED9, SSEDA, SSEDB, SSEDC,
  SSEDD, SSEDE, SSEDF, SSEE0,
  SSEE1, SSEE2, SSEE3, SSEE4,
  SSEE5, SSEE6, SSEE7, SSEE8,
  SSEE9, SSEEA, SSEEB, SSEEC,
  SSEED, SSEEE, SSEEF, SSEF0,
  SSEF1, SSEF2, SSEF3, SSEF4,
  SSEF5, SSEF6, SSEF7, SSEF8,
  SSEF9, SSEFA, SSEFB, SSEFC,
  SSEFD, SSEFE, SSEFF
}
enum  {
  SSEB00 = 0, SSEB01, SSEB02, SSEB03,
  SSEB04, SSEB05, SSEB06, SSEB07,
  SSEB08, SSEB09, SSEB0A, SSEB0B,
  SSEB10, SSEB14, SSEB15, SSEB17,
  SSEB1C, SSEB1D, SSEB1E, SSEB20,
  SSEB21, SSEB22, SSEB23, SSEB24,
  SSEB25, SSEB28, SSEB29, SSEB2A,
  SSEB2B, SSEB30, SSEB31, SSEB32,
  SSEB33, SSEB34, SSEB35, SSEB37,
  SSEB38, SSEB39, SSEB3A, SSEB3B,
  SSEB3C, SSEB3D, SSEB3E, SSEB3F,
  SSEB40, SSEB41, SSEBF0, SSEBF1
}
enum  {
  SSET08 = 0, SSET09, SSET0A, SSET0B,
  SSET0C, SSET0D, SSET0E, SSET0F,
  SSET14, SSET15, SSET16, SSET17,
  SSET20, SSET21, SSET22, SSET40,
  SSET41, SSET42, SSET60, SSET61,
  SSET62, SSET63
}
enum  {
  G12SSE010B = 0, G12SSE100B, G12SSE110B, G13SSE010B,
  G13SSE100B, G13SSE110B, G14SSE010B, G14SSE011B,
  G14SSE110B, G14SSE111B
}
enum  {
  GrpD8 = 0, GrpD9, GrpDA, GrpDB,
  GrpDC, GrpDD, GrpDE, GrpDF
}
enum  {
  fNT = 1, fPREFETCHNT, fPREFETCHT0, fPREFETCHT1,
  fPREFETCHT2, fPREFETCHAMDE, fPREFETCHAMDW, fCALL,
  fNEARRET, fFARRET, fIRET, fENTER,
  fLEAVE, fXLAT, fIO, fSEGDESC,
  fCOND, fCMPXCH, fCMPXCH8, fINDIRCALL,
  fINDIRJUMP, fFXSAVE, fFXRSTOR, fCLFLUSH,
  fREP, fSCAS, fCMPS
}

Functions

COMMON_EXPORT void ia32_set_mode_64 (bool mode)
COMMON_EXPORT bool ia32_is_mode_64 ()
int apply_rex_bit (int reg, bool rex_bit)
bool ia32_decode_prefixes (const unsigned char *addr, ia32_prefixes &, ia32_locations *loc=NULL)
COMMON_EXPORT ia32_instructionia32_decode (unsigned int capabilities, const unsigned char *addr, ia32_instruction &)
COMMON_EXPORT unsigned get_instruction (const unsigned char *instr, unsigned &instType, const unsigned char **op_ptr=NULL)
COMMON_EXPORT Address get_target (const unsigned char *instr, unsigned type, unsigned size, Address addr)
unsigned int swapBytesIfNeeded (unsigned int i)
COMMON_EXPORT int get_disp (instruction *insn)
int set_disp (bool setDisp, instruction *insn, int newOffset, bool outOfFunc)
int displacement (const unsigned char *instr, unsigned type)
Address get_immediate_operand (instruction *instr)
COMMON_EXPORT int count_prefixes (unsigned insnType)
bool is_disp8 (long disp)
bool is_disp16 (long disp)
bool is_disp32 (long disp)
bool is_disp32 (Address a1, Address a2)
bool is_addr32 (Address addr)
COMMON_EXPORT void decode_SIB (unsigned sib, unsigned &scale, Register &index_reg, Register &base_reg)
COMMON_EXPORT const unsigned char * skip_headers (const unsigned char *, ia32_prefixes *=NULL)
Address region_lo (const Address)
Address region_hi (const Address)
COMMON_EXPORT bool insn_hasSIB (unsigned, unsigned &, unsigned &, unsigned &)
COMMON_EXPORT bool insn_hasDisp8 (unsigned ModRM)
COMMON_EXPORT bool insn_hasDisp32 (unsigned ModRM)
COMMON_EXPORT bool isStackFramePrecheck_msvs (const unsigned char *buffer)
COMMON_EXPORT bool isStackFramePrecheck_gcc (const unsigned char *buffer)
static void ia32_translate_for_64 (ia32_entry **gotit_ptr)
static unsigned int ia32_decode_modrm (const unsigned int addrSzAttr, const unsigned char *addr, ia32_memacc *macadr, const ia32_prefixes *pref, ia32_locations *pos)
int getOperSz (const ia32_prefixes &pref)
ia32_instructionia32_decode_FP (unsigned int opcode, const ia32_prefixes &pref, const unsigned char *addr, ia32_instruction &instruct, ia32_entry *entry, ia32_memacc *mac)
static int type2size (unsigned int optype, unsigned int operSzAttr)
unsigned int ia32_decode_operands (const ia32_prefixes &pref, const ia32_entry &gotit, const unsigned char *addr, ia32_instruction &instruct, ia32_memacc *mac)
bool is_sse_opcode (unsigned char byte1, unsigned char byte2, unsigned char byte3)
bool ia32_decode_rex (const unsigned char *addr, ia32_prefixes &pref, ia32_locations *loc)
unsigned int ia32_emulate_old_type (ia32_instruction &instruct)
unsigned copy_prefixes (const unsigned char *&origInsn, unsigned char *&newInsn, unsigned insnType)
unsigned copy_prefixes_nosize (const unsigned char *&origInsn, unsigned char *&newInsn, unsigned insnType)
bool convert_to_rel8 (const unsigned char *&origInsn, unsigned char *&newInsn)
bool convert_to_rel32 (const unsigned char *&origInsn, unsigned char *&newInsn)

Variables

const unsigned char SYSCALL [] = {0x0F, 0x05}
COMMON_EXPORT dyn_hash_map
< entryID, std::string > 
entryNames_IAPI
dyn_hash_map< prefixEntryID,
std::string > 
prefixEntryNames_IAPI
static ia32_entry oneByteMap [256]
static ia32_entry twoByteMap [256]
static ia32_entry threeByteMap [256]
static ia32_entry threeByteMap2 [256]
static ia32_entry fpuMap [][2][8]
static ia32_entry groupMap [][8]
static ia32_entry groupMap2 [][2][8]
static ia32_entry sseMap [][4]
static ia32_entry sseMapBis [][5]
static ia32_entry sseMapTer [][3]
static ia32_entry ssegrpMap [][2]
static bool mode_64 = false
ia32_entry movsxd = { e_movsxd, t_done, 0, true, { Gv, Ed, Zz }, 0, s1W2R }
ia32_entry invalid = { e_No_Entry, t_ill, 0, true, { Zz, Zz, Zz }, 0, 0 }
static const unsigned char sse_prefix [256]
static const unsigned char sse_prefix_bis [256]
static const unsigned char sse_prefix_ter [256]
unsigned char illegalRep [2] = {0x0f, 0x0b}
unsigned char trapRep [1] = {0xCC}

Typedef Documentation

typedef char NS_x86::byte_t

Definition at line 57 of file arch-x86.h.

typedef int NS_x86::dword_t

Definition at line 59 of file arch-x86.h.

typedef short NS_x86::word_t

Definition at line 58 of file arch-x86.h.


Enumeration Type Documentation

anonymous enum
Enumerator:
RepGroup 

Definition at line 375 of file arch-x86.h.

anonymous enum
Enumerator:
am_A 
am_C 
am_D 
am_E 
am_F 
am_G 
am_I 
am_J 
am_M 
am_O 
am_P 
am_Q 
am_R 
am_S 
am_T 
am_U 
am_UM 
am_V 
am_W 
am_X 
am_Y 
am_reg 
am_stackH 
am_stackP 
am_allgprs 
am_VR 
am_tworeghack 
am_ImplImm 
am_RM 

Definition at line 409 of file arch-x86.h.

anonymous enum
Enumerator:
Grp1a 
Grp1b 
Grp1c 
Grp1d 
Grp2 
Grp3a 
Grp3b 
Grp4 
Grp5 
Grp6 
Grp7 
Grp8 
Grp9 
Grp11 
Grp12 
Grp13 
Grp14 
Grp15 
Grp16 
Grp17 
GrpAMD 

Definition at line 71 of file arch-x86.C.

anonymous enum
Enumerator:
SSE10 
SSE11 
SSE12 
SSE13 
SSE14 
SSE15 
SSE16 
SSE17 
SSE28 
SSE29 
SSE2A 
SSE2B 
SSE2C 
SSE2D 
SSE2E 
SSE2F 
SSE50 
SSE51 
SSE52 
SSE53 
SSE54 
SSE55 
SSE56 
SSE57 
SSE58 
SSE59 
SSE5A 
SSE5B 
SSE5C 
SSE5D 
SSE5E 
SSE5F 
SSE60 
SSE61 
SSE62 
SSE63 
SSE64 
SSE65 
SSE66 
SSE67 
SSE68 
SSE69 
SSE6A 
SSE6B 
SSE6C 
SSE6D 
SSE6E 
SSE6F 
SSE70 
SSE74 
SSE75 
SSE76 
SSE78 
SSE79 
SSE7C 
SSE7D 
SSE7E 
SSE7F 
SSEB8 
SSEC2 
SSEC4 
SSEC5 
SSEC6 
SSED0 
SSED1 
SSED2 
SSED3 
SSED4 
SSED5 
SSED6 
SSED7 
SSED8 
SSED9 
SSEDA 
SSEDB 
SSEDC 
SSEDD 
SSEDE 
SSEDF 
SSEE0 
SSEE1 
SSEE2 
SSEE3 
SSEE4 
SSEE5 
SSEE6 
SSEE7 
SSEE8 
SSEE9 
SSEEA 
SSEEB 
SSEEC 
SSEED 
SSEEE 
SSEEF 
SSEF0 
SSEF1 
SSEF2 
SSEF3 
SSEF4 
SSEF5 
SSEF6 
SSEF7 
SSEF8 
SSEF9 
SSEFA 
SSEFB 
SSEFC 
SSEFD 
SSEFE 
SSEFF 

Definition at line 77 of file arch-x86.C.

anonymous enum
Enumerator:
SSEB00 
SSEB01 
SSEB02 
SSEB03 
SSEB04 
SSEB05 
SSEB06 
SSEB07 
SSEB08 
SSEB09 
SSEB0A 
SSEB0B 
SSEB10 
SSEB14 
SSEB15 
SSEB17 
SSEB1C 
SSEB1D 
SSEB1E 
SSEB20 
SSEB21 
SSEB22 
SSEB23 
SSEB24 
SSEB25 
SSEB28 
SSEB29 
SSEB2A 
SSEB2B 
SSEB30 
SSEB31 
SSEB32 
SSEB33 
SSEB34 
SSEB35 
SSEB37 
SSEB38 
SSEB39 
SSEB3A 
SSEB3B 
SSEB3C 
SSEB3D 
SSEB3E 
SSEB3F 
SSEB40 
SSEB41 
SSEBF0 
SSEBF1 

Definition at line 97 of file arch-x86.C.

anonymous enum
Enumerator:
SSET08 
SSET09 
SSET0A 
SSET0B 
SSET0C 
SSET0D 
SSET0E 
SSET0F 
SSET14 
SSET15 
SSET16 
SSET17 
SSET20 
SSET21 
SSET22 
SSET40 
SSET41 
SSET42 
SSET60 
SSET61 
SSET62 
SSET63 

Definition at line 111 of file arch-x86.C.

anonymous enum
Enumerator:
G12SSE010B 
G12SSE100B 
G12SSE110B 
G13SSE010B 
G13SSE100B 
G13SSE110B 
G14SSE010B 
G14SSE011B 
G14SSE110B 
G14SSE111B 

Definition at line 121 of file arch-x86.C.

anonymous enum
Enumerator:
GrpD8 
GrpD9 
GrpDA 
GrpDB 
GrpDC 
GrpDD 
GrpDE 
GrpDF 

Definition at line 127 of file arch-x86.C.

anonymous enum
Enumerator:
fNT 
fPREFETCHNT 
fPREFETCHT0 
fPREFETCHT1 
fPREFETCHT2 
fPREFETCHAMDE 
fPREFETCHAMDW 
fCALL 
fNEARRET 
fFARRET 
fIRET 
fENTER 
fLEAVE 
fXLAT 
fIO 
fSEGDESC 
fCOND 
fCMPXCH 
fCMPXCH8 
fINDIRCALL 
fINDIRJUMP 
fFXSAVE 
fFXRSTOR 
fCLFLUSH 
fREP 
fSCAS 
fCMPS 

Definition at line 278 of file arch-x86.C.

anonymous enum
Enumerator:
op_a 
op_b 
op_c 
op_d 
op_dq 
op_p 
op_pd 
op_pi 
op_ps 
op_q 
op_s 
op_sd 
op_ss 
op_si 
op_v 
op_w 
op_y 
op_z 
op_lea 
op_allgprs 
op_512 
op_f 
op_dbl 
op_14 
op_28 
op_edxeax 
op_ecxebx 

Definition at line 415 of file arch-x86.h.

anonymous enum
Enumerator:
t_ill 
t_oneB 
t_twoB 
t_threeB 
t_threeB2 
t_prefixedSSE 
t_coprocEsc 
t_grp 
t_sse 
t_sse_bis 
t_sse_ter 
t_grpsse 
t_3dnow 
t_done 

Definition at line 421 of file arch-x86.h.

anonymous enum
Enumerator:
mRAX 
mRCX 
mRDX 
mRBX 
mRSP 
mRBP 
mRSI 
mRDI 
mR8 
mR9 
mR10 
mR11 
mR12 
mR13 
MR14 
mR15 
mRIP 

Definition at line 426 of file arch-x86.h.

anonymous enum
Enumerator:
mEAX 
mECX 
mEDX 
mEBX 
mESP 
mEBP 
mESI 
mEDI 

Definition at line 431 of file arch-x86.h.

anonymous enum
Enumerator:
mAX 
mCX 
mDX 
mBX 
mSP 
mBP 
mSI 
mDI 

Definition at line 434 of file arch-x86.h.

anonymous enum
Enumerator:
sNONE 
s1R 
s1W 
s1RW 
s1R2R 
s1W2R 
s1RW2R 
s1RW2RW 
s1W2R3R 
s1W2W3R 
s1W2RW3R 
s1R2RW 
s1W2RW 
s1W2R3RW 
s1RW2R3R 
s1RW2RW3R 
s1R2R3R 

Definition at line 444 of file arch-x86.h.

Enumerator:
REGNUM_RAX 
REGNUM_RCX 
REGNUM_RDX 
REGNUM_RBX 
REGNUM_RSP 
REGNUM_RBP 
REGNUM_RSI 
REGNUM_RDI 
REGNUM_R8 
REGNUM_R9 
REGNUM_R10 
REGNUM_R11 
REGNUM_R12 
REGNUM_R13 
REGNUM_R14 
REGNUM_R15 
REGNUM_DUMMYFPR 
REGNUM_OF 
REGNUM_SF 
REGNUM_ZF 
REGNUM_AF 
REGNUM_PF 
REGNUM_CF 
REGNUM_TF 
REGNUM_IF 
REGNUM_DF 
REGNUM_NT 
REGNUM_RF 
REGNUM_MM0 
REGNUM_MM1 
REGNUM_MM2 
REGNUM_MM3 
REGNUM_MM4 
REGNUM_MM5 
REGNUM_MM6 
REGNUM_MM7 
REGNUM_XMM0 
REGNUM_XMM1 
REGNUM_XMM2 
REGNUM_XMM3 
REGNUM_XMM4 
REGNUM_XMM5 
REGNUM_XMM6 
REGNUM_XMM7 
REGNUM_XMM8 
REGNUM_XMM9 
REGNUM_XMM10 
REGNUM_XMM11 
REGNUM_XMM12 
REGNUM_XMM13 
REGNUM_XMM14 
REGNUM_XMM15 
REGNUM_EFLAGS 
REGNUM_IGNORED 

Definition at line 75 of file arch-x86.h.

Enumerator:
REGISTER_DIRECT 
REGISTER_INDIRECT 
REGISTER_INDIRECT_DISPLACED 
SIB 
DISPLACED 
IP_INDIRECT_DISPLACED 

Definition at line 715 of file arch-x86.h.

Enumerator:
shREP 
shREPECMPS 
shREPESCAS 
shREPNECMPS 
shREPNESCAS 

Definition at line 583 of file arch-x86.h.


Function Documentation

int NS_x86::apply_rex_bit ( int  reg,
bool  rex_bit 
) [inline]

Definition at line 506 of file arch-x86.h.

Referenced by ia32_decode_modrm().

bool NS_x86::convert_to_rel32 ( const unsigned char *&  origInsn,
unsigned char *&  newInsn 
)

Definition at line 5443 of file arch-x86.C.

References fprintf.

bool NS_x86::convert_to_rel8 ( const unsigned char *&  origInsn,
unsigned char *&  newInsn 
)

Definition at line 5413 of file arch-x86.C.

References fprintf.

unsigned NS_x86::copy_prefixes ( const unsigned char *&  origInsn,
unsigned char *&  newInsn,
unsigned  insnType 
)

Definition at line 5388 of file arch-x86.C.

References count_prefixes().

unsigned NS_x86::copy_prefixes_nosize ( const unsigned char *&  origInsn,
unsigned char *&  newInsn,
unsigned  insnType 
)

Definition at line 5397 of file arch-x86.C.

References count_prefixes().

int NS_x86::count_prefixes ( unsigned  insnType  ) 
void NS_x86::decode_SIB ( unsigned  sib,
unsigned &  scale,
Register index_reg,
Register base_reg 
)

Definition at line 5472 of file arch-x86.C.

Referenced by NS_x86::instruction::isNop().

int NS_x86::displacement ( const unsigned char *  instr,
unsigned  type 
)

Definition at line 5322 of file arch-x86.C.

References IS_CALL, IS_JCC, IS_JUMP, REL_B, REL_D, REL_D_DATA, REL_W, and skip_headers().

Referenced by get_disp(), and get_target().

int NS_x86::get_disp ( instruction *  insn  ) 

Only appropriate for call/jump functions

Definition at line 5611 of file arch-x86.C.

References displacement(), NS_x86::instruction::ptr(), and NS_x86::instruction::type().

Address NS_x86::get_immediate_operand ( instruction *  instr  ) 
unsigned NS_x86::get_instruction ( const unsigned char *  instr,
unsigned &  instType,
const unsigned char **  op_ptr = NULL 
)
Address NS_x86::get_target ( const unsigned char *  instr,
unsigned  type,
unsigned  size,
Address  addr 
)

Definition at line 5309 of file arch-x86.C.

References displacement(), and relocationTarget().

Referenced by NS_x86::instruction::getTarget().

int NS_x86::getOperSz ( const ia32_prefixes &  pref  ) 
ia32_instruction & NS_x86::ia32_decode ( unsigned int  capabilities,
const unsigned char *  addr,
ia32_instruction &  instruct 
)

Definition at line 3938 of file arch-x86.C.

References NS_x86::ia32_instruction::cond, e_cbw, e_cdq, e_cwd, e_cwde, e_insd, e_insw, e_lodsd, e_lodsw, e_movsd, e_movsw, e_No_Entry, e_outsd, e_outsw, e_popa, e_popad, e_popf, e_popfd, e_pusha, e_pushad, e_pushf, e_pushfd, e_scasd, e_scasw, e_stosd, e_stosw, NS_x86::ia32_instruction::entry, fCMPS, fCOND, fNT, FPOS, fPREFETCHAMDE, fPREFETCHAMDW, fPREFETCHNT, fPREFETCHT0, fPREFETCHT1, fPREFETCHT2, fprintf, fREP, fSCAS, NS_x86::ia32_prefixes::getCount(), NS_x86::ia32_prefixes::getOpcodePrefix(), getOperSz(), NS_x86::ia32_prefixes::getPrefix(), Grp11, Grp12, Grp2, IA32_DECODE_CONDITION, ia32_decode_FP(), IA32_DECODE_MEMACCESS, ia32_decode_operands(), ia32_decode_prefixes(), ia32_translate_for_64(), NS_x86::ia32_entry::id, ILLEGAL, NS_x86::ia32_memacc::is, NS_x86::ia32_instruction::legacy_type, NS_x86::ia32_entry::legacyType, NS_x86::ia32_instruction::loc, NS_x86::ia32_instruction::mac, NS_x86::ia32_memacc::nt, ia32_locations::num_prefixes, oneByteMap, ia32_locations::opcode_position, ia32_locations::opcode_size, NS_x86::ia32_entry::opsema, NS_x86::ia32_entry::otable, NS_x86::ia32_memacc::prefetch, NS_x86::ia32_memacc::prefetchlvl, NS_x86::ia32_memacc::prefetchstt, PREFIX_LOCK, PREFIX_REP, PREFIX_REPNZ, NS_x86::ia32_instruction::prf, NS_x86::ia32_memacc::print(), NS_x86::ia32_memacc::read, s1R, s1R2R, s1RW, s1RW2R, s1RW2R3R, s1RW2RW, s1RW2RW3R, s1W, s1W2R, s1W2R3R, s1W2R3RW, s1W2RW3R, s1W2W3R, NS_x86::ia32_condition::set(), shREP, shREPECMPS, shREPESCAS, shREPNECMPS, shREPNESCAS, NS_x86::ia32_instruction::size, NS_x86::ia32_memacc::sizehack, sNONE, t_3dnow, t_coprocEsc, t_grp, t_grpsse, t_ill, t_oneB, t_prefixedSSE, t_sse, t_sse_bis, t_sse_ter, t_threeB, t_threeB2, t_twoB, NS_x86::ia32_entry::tabidx, and NS_x86::ia32_memacc::write.

Referenced by get_immediate_operand(), get_instruction(), NS_x86::instruction::getStackDelta(), NS_x86::instruction::getUsedRegs(), and NS_x86::instruction::isNop().

ia32_instruction& NS_x86::ia32_decode_FP ( unsigned int  opcode,
const ia32_prefixes &  pref,
const unsigned char *  addr,
ia32_instruction &  instruct,
ia32_entry *  entry,
ia32_memacc *  mac 
)
static unsigned int NS_x86::ia32_decode_modrm ( const unsigned int  addrSzAttr,
const unsigned char *  addr,
ia32_memacc *  macadr,
const ia32_prefixes *  pref,
ia32_locations pos 
) [static]
unsigned int NS_x86::ia32_decode_operands ( const ia32_prefixes &  pref,
const ia32_entry &  gotit,
const unsigned char *  addr,
ia32_instruction &  instruct,
ia32_memacc *  mac 
)
bool NS_x86::ia32_decode_prefixes ( const unsigned char *  addr,
ia32_prefixes &  pref,
ia32_locations loc = NULL 
)
bool NS_x86::ia32_decode_rex ( const unsigned char *  addr,
ia32_prefixes &  pref,
ia32_locations loc 
)
unsigned int NS_x86::ia32_emulate_old_type ( ia32_instruction &  instruct  ) 
bool NS_x86::ia32_is_mode_64 (  ) 

Definition at line 3878 of file arch-x86.C.

void NS_x86::ia32_set_mode_64 ( bool  mode  ) 

Definition at line 3874 of file arch-x86.C.

static void NS_x86::ia32_translate_for_64 ( ia32_entry **  gotit_ptr  )  [static]

Definition at line 3885 of file arch-x86.C.

References oneByteMap.

Referenced by ia32_decode().

bool NS_x86::insn_hasDisp32 ( unsigned  ModRM  ) 

Definition at line 5511 of file arch-x86.C.

bool NS_x86::insn_hasDisp8 ( unsigned  ModRM  ) 

Definition at line 5506 of file arch-x86.C.

bool NS_x86::insn_hasSIB ( unsigned  ModRMbyte,
unsigned &  Mod,
unsigned &  Reg,
unsigned &  RM 
)

Definition at line 5499 of file arch-x86.C.

bool NS_x86::is_addr32 ( Address  addr  )  [inline]

Definition at line 910 of file arch-x86.h.

References UI32_MAX.

bool NS_x86::is_disp16 ( long  disp  )  [inline]

Definition at line 900 of file arch-x86.h.

bool NS_x86::is_disp32 ( Address  a1,
Address  a2 
) [inline]

Definition at line 907 of file arch-x86.h.

References is_disp32(), and JUMP_REL32_SZ.

bool NS_x86::is_disp32 ( long  disp  )  [inline]

Definition at line 904 of file arch-x86.h.

References I32_MIN.

Referenced by is_disp32().

bool NS_x86::is_disp8 ( long  disp  )  [inline]

Definition at line 896 of file arch-x86.h.

bool NS_x86::is_sse_opcode ( unsigned char  byte1,
unsigned char  byte2,
unsigned char  byte3 
)

Definition at line 5129 of file arch-x86.C.

Referenced by ia32_decode_prefixes().

bool NS_x86::isStackFramePrecheck_gcc ( const unsigned char *  buffer  ) 

Definition at line 5615 of file arch-x86.C.

bool NS_x86::isStackFramePrecheck_msvs ( const unsigned char *  buffer  ) 

Definition at line 5639 of file arch-x86.C.

Address NS_x86::region_hi ( const   Address  )  [inline]

Definition at line 922 of file arch-x86.h.

Address NS_x86::region_lo ( const   Address  )  [inline]

Definition at line 921 of file arch-x86.h.

int NS_x86::set_disp ( bool  setDisp,
instruction *  insn,
int  newOffset,
bool  outOfFunc 
)
const unsigned char * NS_x86::skip_headers ( const unsigned char *  addr,
ia32_prefixes *  prefs = NULL 
)

Definition at line 5490 of file arch-x86.C.

References NS_x86::ia32_prefixes::getCount(), and ia32_decode_prefixes().

Referenced by displacement().

unsigned int NS_x86::swapBytesIfNeeded ( unsigned int  i  ) 
static int NS_x86::type2size ( unsigned int  optype,
unsigned int  operSzAttr 
) [inline, static]

Variable Documentation

COMMON_EXPORT dyn_hash_map< entryID, std::string > NS_x86::entryNames_IAPI

Definition at line 308 of file arch-x86.C.

Referenced by NS_x86::ia32_entry::name().

ia32_entry NS_x86::fpuMap[][2][8] [static]

Definition at line 2186 of file arch-x86.C.

Definition at line 2367 of file arch-x86.C.

ia32_entry NS_x86::groupMap2[][2][8] [static]

Definition at line 2533 of file arch-x86.C.

unsigned char NS_x86::illegalRep[2] = {0x0f, 0x0b}

Definition at line 5520 of file arch-x86.C.

ia32_entry NS_x86::invalid = { e_No_Entry, t_ill, 0, true, { Zz, Zz, Zz }, 0, 0 }

Definition at line 3883 of file arch-x86.C.

bool NS_x86::mode_64 = false [static]

Definition at line 3872 of file arch-x86.C.

ia32_entry NS_x86::movsxd = { e_movsxd, t_done, 0, true, { Gv, Ed, Zz }, 0, s1W2R }

Definition at line 3882 of file arch-x86.C.

Definition at line 1009 of file arch-x86.C.

Referenced by ia32_decode(), and ia32_translate_for_64().

COMMON_EXPORT dyn_hash_map< prefixEntryID, std::string > NS_x86::prefixEntryNames_IAPI
Initial value:
 map_list_of
  (prefix_rep, "REP")
  (prefix_repnz, "REPNZ")

Definition at line 816 of file arch-x86.C.

const unsigned char NS_x86::sse_prefix[256] [static]
Initial value:
 {
  
   0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
   1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,
   0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,
   0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
   0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
   1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
   1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
   1,1,1,1,1,1,1,0,1,1,0,0,1,1,1,1, 
   0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
   0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
   0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
   0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,
   0,0,1,0,1,1,1,0,0,0,0,0,0,0,0,0,
   1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
   1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
   1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
}

Definition at line 5067 of file arch-x86.C.

const unsigned char NS_x86::sse_prefix_bis[256] [static]
Initial value:
 {
  
   1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,
   1,0,0,0,1,1,0,1,0,0,0,0,1,1,1,0,
   1,1,1,1,1,1,0,0,1,1,1,1,0,0,0,0,
   1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,
   1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
   0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
   0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
   0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
   0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
   0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
   0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
   0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
   0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
   0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
   0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
   1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
}

Definition at line 5087 of file arch-x86.C.

const unsigned char NS_x86::sse_prefix_ter[256] [static]
Initial value:
 {
  
   0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,
   0,0,0,0,1,1,1,1,0,0,0,0,0,0,0,0,
   1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,
   0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
   1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,
   0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
   1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,
   0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
   0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
   0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
   0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
   0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
   0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
   0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
   0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
   0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
}

Definition at line 5107 of file arch-x86.C.

Definition at line 3819 of file arch-x86.C.

ia32_entry NS_x86::sseMap[][4] [static]

Definition at line 2693 of file arch-x86.C.

Definition at line 3363 of file arch-x86.C.

Definition at line 3704 of file arch-x86.C.

const unsigned char NS_x86::SYSCALL[] = {0x0F, 0x05}

Definition at line 363 of file arch-x86.h.

Referenced by NS_x86::instruction::isSysCallInsn().

Definition at line 1604 of file arch-x86.C.

Definition at line 1895 of file arch-x86.C.

unsigned char NS_x86::trapRep[1] = {0xCC}

Definition at line 5521 of file arch-x86.C.

Definition at line 1305 of file arch-x86.C.

 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 12 Jul 2013 for SymtabAPI by  doxygen 1.6.1