arch-x86.h File Reference

#include "common/h/Types.h"
#include <stdio.h>
#include <common/h/Vector.h>
#include <set>
#include <map>
#include <vector>
#include "dyn_regs.h"
#include "entryIDs.h"
#include "common/h/ia32_locations.h"

Go to the source code of this file.

Data Structures

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

Namespaces

namespace  NS_x86

Defines

#define REGNUM_EAX   0
#define REGNUM_ECX   1
#define REGNUM_EDX   2
#define REGNUM_EBX   3
#define REGNUM_ESP   4
#define REGNUM_EBP   5
#define REGNUM_ESI   6
#define REGNUM_EDI   7
#define maxGPR   8
#define READ_OP   0
#define WRITE_OP   1
#define byteSzB   (1)
#define wordSzB   (2)
#define dwordSzB   (4)
#define qwordSzB   (8)
#define dqwordSzB   (16)
#define IS_CALL   (1<<1)
#define IS_RET   (1<<2)
#define IS_RETF   (1<<3)
#define IS_JUMP   (1<<4)
#define IS_JCC   (1<<5)
#define ILLEGAL   (1<<6)
#define PRVLGD   (1<<7)
#define IS_RETC   (1<<8)
#define IS_NOP   (1<<9)
#define REL_B   (1<<10)
#define REL_W   (1<<11)
#define REL_D   (1<<12)
#define REL_X   (1<<13)
#define INDIR   (1<<14)
#define PTR_WW   (1<<15)
#define PTR_WD   (1<<16)
#define PTR_WX   (1<<17)
#define REL_D_DATA   (1<<18)
#define PREFIX_INST   (1<<20)
#define PREFIX_SEG   (1<<21)
#define PREFIX_OPR   (1<<22)
#define PREFIX_ADDR   (1<<23)
#define PREFIX_REX   (1<<24)
#define PREFIX_OPCODE   (1<<25)
#define ADD_EB_GB   (0x00)
#define ADD_EV_GV   (0x01)
#define ADD_GB_EB   (0x02)
#define ADD_GV_EV   (0x03)
#define ADD_AL_LB   (0x04)
#define ADD_RAX_LZ   (0x05)
#define PUSHES   (0x06)
#define POPES   (0x07)
#define OR_EB_GB   (0x08)
#define OR_EV_GV   (0x09)
#define OR_GB_EB   (0x0A)
#define OR_GV_EV   (0x0B)
#define OR_AL_LB   (0x0C)
#define OR_RAX_LZ   (0x0D)
#define PUSHCS   (0x0E)
#define TWO_BYTE_OPCODE   (0x0F)
#define ADC_EB_GB   (0x10)
#define ADC_EV_GV   (0x11)
#define ADC_GB_EB   (0x12)
#define ADC_GV_EV   (0x13)
#define ADC_AL_LB   (0x14)
#define ADC_RAX_LZ   (0x15)
#define PUSHSS   (0x16)
#define POPSS   (0x17)
#define SBB_EB_GB   (0x18)
#define SBB_EV_GV   (0x19)
#define SBB_GB_EB   (0x1A)
#define SBB_GV_EV   (0x1B)
#define SBB_AL_LB   (0x1C)
#define SBB_RAX_LZ   (0x1D)
#define PUSH_DS   (0x1E)
#define POP_DS   (0X1F)
#define AND_EB_GB   (0x20)
#define AND_EV_GV   (0x21)
#define AND_GB_EB   (0x22)
#define AND_GV_EV   (0x23)
#define AND_AL_LB   (0x24)
#define AND_RAX_LZ   (0x25)
#define SEG_ES   (0x26)
#define DAA   (0x27)
#define SUB_EB_GB   (0x28)
#define SUB_EV_GV   (0x29)
#define SUB_GB_EB   (0x2A)
#define SUB_GV_EV   (0x2B)
#define SUB_AL_LB   (0x2C)
#define SUB_RAX_LZ   (0x2D)
#define XOR_EB_GB   (0x30)
#define XOR_EV_GV   (0x31)
#define XOR_GB_EB   (0x32)
#define XOR_GV_EV   (0x33)
#define XOR_AL_LB   (0x34)
#define XOR_RAX_LZ   (0x35)
#define XOR_RM16_R16   (0x31)
#define XOR_RM32_R32   (0x31)
#define XOR_R8_RM8   (0x32)
#define XOR_R16_RM16   (0x33)
#define XOR_R32_RM32   (0x33)
#define SEG_SS   (0x36)
#define AAA   (0x37)
#define CMP_EB_GB   (0x38)
#define CMP_EV_GV   (0x39)
#define CMP_GB_EB   (0x3A)
#define CMP_GV_EV   (0x3B)
#define CMP_AL_LB   (0x3C)
#define CMP_RAX_LZ   (0x3D)
#define TEST_EV_GV   (0x85)
#define INC_EAX   (0x40)
#define INC_ECX   (0x41)
#define INC_EDX   (0x42)
#define INC_EBX   (0x43)
#define INC_ESP   (0x44)
#define INC_EBP   (0x45)
#define INC_ESI   (0x46)
#define INC_EDI   (0x47)
#define DEC_EAX   (0x48)
#define DEC_ECX   (0x49)
#define DEC_EDX   (0x50)
#define DEC_EBX   (0x51)
#define DEC_ESP   (0x52)
#define DEC_EBP   (0x53)
#define DEC_ESI   (0x54)
#define DEC_EDI   (0x55)
#define PUSHEAX   (0x50)
#define PUSHECX   (0x51)
#define PUSHEDX   (0x52)
#define PUSHEBX   (0x53)
#define PUSHESP   (0x54)
#define PUSHEBP   (0x55)
#define PUSHESI   (0x56)
#define PUSHEDI   (0x57)
#define POP_EAX   (0x58)
#define POP_ECX   (0x59)
#define POP_EDX   (0x5A)
#define POP_EBX   (0x5b)
#define POP_ESP   (0x5c)
#define POP_EBP   (0x5d)
#define POP_EBI   (0x5e)
#define POP_EDI   (0x5f)
#define PUSHAD   (0x60)
#define POPAD   (0x61)
#define JE_R8   (0x74)
#define JNE_R8   (0x75)
#define JL_R8   (0x7C)
#define JLE_R8   (0x7E)
#define JG_R8   (0x7F)
#define JGE_R8   (0x7D)
#define MOVREGMEM_REG   (0x8b)
#define MOV_R8_TO_RM8   (0x88)
#define MOV_R16_TO_RM16   (0x89)
#define MOV_R32_TO_RM32   (0x89)
#define MOV_RM8_TO_R8   (0x8A)
#define MOV_RM16_TO_R16   (0x8b)
#define MOV_RM32_TO_R32   (0x8b)
#define NOP   (0x90)
#define PUSHFD   (0x9C)
#define POPFD   (0x9D)
#define JCXZ   (0xE3)
#define FSAVE   (0x9BDD)
#define FSAVE_OP   (6)
#define FRSTOR   (0xDD)
#define FRSTOR_OP   (4)
#define MIN_IMM8   (-128)
#define MAX_IMM8   (127)
#define MIN_IMM16   (-32768)
#define MAX_IMM16   (32767)
#define FSAVE_STATE_SIZE   108
#define PREFIX_LOCK   (unsigned char)(0xF0)
#define PREFIX_REPNZ   (unsigned char)(0xF2)
#define PREFIX_REP   (unsigned char)(0xF3)
#define PREFIX_SEGCS   (unsigned char)(0x2E)
#define PREFIX_SEGSS   (unsigned char)(0x36)
#define PREFIX_SEGDS   (unsigned char)(0x3E)
#define PREFIX_SEGES   (unsigned char)(0x26)
#define PREFIX_SEGFS   (unsigned char)(0x64)
#define PREFIX_SEGGS   (unsigned char)(0x65)
#define PREFIX_BRANCH0   (unsigned char)(0x2E)
#define PREFIX_BRANCH1   (unsigned char)(0x3E)
#define PREFIX_SZOPER   (unsigned char)(0x66)
#define PREFIX_SZADDR   (unsigned char)(0x67)
#define IA32_DECODE_PREFIXES   (1<<0)
#define IA32_DECODE_MNEMONICS   (1<<1)
#define IA32_DECODE_OPERANDS   (1<<2)
#define IA32_DECODE_JMPS   (1<<3)
#define IA32_DECODE_MEMACCESS   (1<<4)
#define IA32_DECODE_CONDITION   (1<<5)
#define IA32_FULL_DECODER   (IA32_DECODE_PREFIXES | IA32_DECODE_MNEMONICS | IA32_DECODE_OPERANDS | IA32_DECODE_JMPS | IA32_DECODE_MEMACCESS | IA32_DECODE_CONDITION)
#define IA32_SIZE_DECODER   0
#define JUMP_REL32_SZ   (6)
#define JUMP_SZ   (5)
#define CALL_REL32_SZ   (5)
#define CALL_ABS32_SZ   (11)
#define JUMP_ABS32_SZ   (6)
#define CALL_RELOC_THUNK   (13)
#define PUSH_RM_OPC1   (0xFF)
#define PUSH_RM_OPC2   (6)
#define CALL_RM_OPC1   (0xFF)
#define CALL_RM_OPC2   (2)
#define JUMP_RM_OPC1   (0xFF)
#define JUMP_RM_OPC2   (4)
#define PUSH_EBP   (0x50+REGNUM_EBP)
#define SUB_REG_IMM32   (5)
#define LEAVE   (0xC9)
#define EXTENDED_0x81_ADD   0
#define EXTENDED_0x81_OR   1
#define EXTENDED_0x81_ADDC   2
#define EXTENDED_0x81_SHIFT   3
#define EXTENDED_0x81_AND   4
#define EXTENDED_0x81_SUB   5
#define EXTENDED_0x81_XOR   6
#define EXTENDED_0x81_CMP   7
#define EXTENDED_0x83_AND   4

Typedefs

typedef char NS_x86::byte_t
typedef short NS_x86::word_t
typedef int NS_x86::dword_t

Enumerations

enum  NS_x86::AMD64_REG_NUMBERS {
  NS_x86::REGNUM_RAX = 0, NS_x86::REGNUM_RCX, NS_x86::REGNUM_RDX, NS_x86::REGNUM_RBX,
  NS_x86::REGNUM_RSP, NS_x86::REGNUM_RBP, NS_x86::REGNUM_RSI, NS_x86::REGNUM_RDI,
  NS_x86::REGNUM_R8, NS_x86::REGNUM_R9, NS_x86::REGNUM_R10, NS_x86::REGNUM_R11,
  NS_x86::REGNUM_R12, NS_x86::REGNUM_R13, NS_x86::REGNUM_R14, NS_x86::REGNUM_R15,
  NS_x86::REGNUM_DUMMYFPR, NS_x86::REGNUM_OF, NS_x86::REGNUM_SF, NS_x86::REGNUM_ZF,
  NS_x86::REGNUM_AF, NS_x86::REGNUM_PF, NS_x86::REGNUM_CF, NS_x86::REGNUM_TF,
  NS_x86::REGNUM_IF, NS_x86::REGNUM_DF, NS_x86::REGNUM_NT, NS_x86::REGNUM_RF,
  NS_x86::REGNUM_MM0, NS_x86::REGNUM_MM1, NS_x86::REGNUM_MM2, NS_x86::REGNUM_MM3,
  NS_x86::REGNUM_MM4, NS_x86::REGNUM_MM5, NS_x86::REGNUM_MM6, NS_x86::REGNUM_MM7,
  NS_x86::REGNUM_XMM0, NS_x86::REGNUM_XMM1, NS_x86::REGNUM_XMM2, NS_x86::REGNUM_XMM3,
  NS_x86::REGNUM_XMM4, NS_x86::REGNUM_XMM5, NS_x86::REGNUM_XMM6, NS_x86::REGNUM_XMM7,
  NS_x86::REGNUM_XMM8, NS_x86::REGNUM_XMM9, NS_x86::REGNUM_XMM10, NS_x86::REGNUM_XMM11,
  NS_x86::REGNUM_XMM12, NS_x86::REGNUM_XMM13, NS_x86::REGNUM_XMM14, NS_x86::REGNUM_XMM15,
  NS_x86::REGNUM_EFLAGS, NS_x86::REGNUM_IGNORED
}
enum  { NS_x86::RepGroup = 0 }
enum  {
  NS_x86::am_A = 1, NS_x86::am_C, NS_x86::am_D, NS_x86::am_E,
  NS_x86::am_F, NS_x86::am_G, NS_x86::am_I, NS_x86::am_J,
  NS_x86::am_M, NS_x86::am_O, NS_x86::am_P, NS_x86::am_Q,
  NS_x86::am_R, NS_x86::am_S, NS_x86::am_T, NS_x86::am_U,
  NS_x86::am_UM, NS_x86::am_V, NS_x86::am_W, NS_x86::am_X,
  NS_x86::am_Y, NS_x86::am_reg, NS_x86::am_stackH, NS_x86::am_stackP,
  NS_x86::am_allgprs, NS_x86::am_VR, NS_x86::am_tworeghack, NS_x86::am_ImplImm,
  NS_x86::am_RM
}
enum  {
  NS_x86::op_a = 1, NS_x86::op_b, NS_x86::op_c, NS_x86::op_d,
  NS_x86::op_dq, NS_x86::op_p, NS_x86::op_pd, NS_x86::op_pi,
  NS_x86::op_ps, NS_x86::op_q, NS_x86::op_s, NS_x86::op_sd,
  NS_x86::op_ss, NS_x86::op_si, NS_x86::op_v, NS_x86::op_w,
  NS_x86::op_y, NS_x86::op_z, NS_x86::op_lea, NS_x86::op_allgprs,
  NS_x86::op_512, NS_x86::op_f, NS_x86::op_dbl, NS_x86::op_14,
  NS_x86::op_28, NS_x86::op_edxeax, NS_x86::op_ecxebx
}
enum  {
  NS_x86::t_ill = 0, NS_x86::t_oneB, NS_x86::t_twoB, NS_x86::t_threeB,
  NS_x86::t_threeB2, NS_x86::t_prefixedSSE, NS_x86::t_coprocEsc, NS_x86::t_grp,
  NS_x86::t_sse, NS_x86::t_sse_bis, NS_x86::t_sse_ter, NS_x86::t_grpsse,
  NS_x86::t_3dnow, NS_x86::t_done = 99
}
enum  {
  NS_x86::mRAX = 0, NS_x86::mRCX, NS_x86::mRDX, NS_x86::mRBX,
  NS_x86::mRSP, NS_x86::mRBP, NS_x86::mRSI, NS_x86::mRDI,
  NS_x86::mR8, NS_x86::mR9, NS_x86::mR10, NS_x86::mR11,
  NS_x86::mR12, NS_x86::mR13, NS_x86::MR14, NS_x86::mR15,
  NS_x86::mRIP
}
enum  {
  NS_x86::mEAX = 0, NS_x86::mECX, NS_x86::mEDX, NS_x86::mEBX,
  NS_x86::mESP, NS_x86::mEBP, NS_x86::mESI, NS_x86::mEDI
}
enum  {
  NS_x86::mAX = 0, NS_x86::mCX, NS_x86::mDX, NS_x86::mBX,
  NS_x86::mSP, NS_x86::mBP, NS_x86::mSI, NS_x86::mDI
}
enum  {
  NS_x86::sNONE = 0, NS_x86::s1R, NS_x86::s1W, NS_x86::s1RW,
  NS_x86::s1R2R, NS_x86::s1W2R, NS_x86::s1RW2R, NS_x86::s1RW2RW,
  NS_x86::s1W2R3R, NS_x86::s1W2W3R, NS_x86::s1W2RW3R, NS_x86::s1R2RW,
  NS_x86::s1W2RW, NS_x86::s1W2R3RW, NS_x86::s1RW2R3R, NS_x86::s1RW2RW3R,
  NS_x86::s1R2R3R
}
enum  NS_x86::sizehacks {
  NS_x86::shREP = 1, NS_x86::shREPECMPS, NS_x86::shREPESCAS, NS_x86::shREPNECMPS,
  NS_x86::shREPNESCAS
}
enum  NS_x86::dynamic_call_address_mode {
  NS_x86::REGISTER_DIRECT, NS_x86::REGISTER_INDIRECT, NS_x86::REGISTER_INDIRECT_DISPLACED, NS_x86::SIB,
  NS_x86::DISPLACED, NS_x86::IP_INDIRECT_DISPLACED
}

Functions

COMMON_EXPORT void NS_x86::ia32_set_mode_64 (bool mode)
COMMON_EXPORT bool NS_x86::ia32_is_mode_64 ()
int NS_x86::apply_rex_bit (int reg, bool rex_bit)
bool NS_x86::ia32_decode_prefixes (const unsigned char *addr, ia32_prefixes &, ia32_locations *loc=NULL)
COMMON_EXPORT ia32_instruction & NS_x86::ia32_decode (unsigned int capabilities, const unsigned char *addr, ia32_instruction &)
COMMON_EXPORT unsigned NS_x86::get_instruction (const unsigned char *instr, unsigned &instType, const unsigned char **op_ptr=NULL)
COMMON_EXPORT Address NS_x86::get_target (const unsigned char *instr, unsigned type, unsigned size, Address addr)
unsigned int NS_x86::swapBytesIfNeeded (unsigned int i)
COMMON_EXPORT int NS_x86::get_disp (instruction *insn)
int NS_x86::set_disp (bool setDisp, instruction *insn, int newOffset, bool outOfFunc)
int NS_x86::displacement (const unsigned char *instr, unsigned type)
Address NS_x86::get_immediate_operand (instruction *instr)
COMMON_EXPORT int NS_x86::count_prefixes (unsigned insnType)
bool NS_x86::is_disp8 (long disp)
bool NS_x86::is_disp16 (long disp)
bool NS_x86::is_disp32 (long disp)
bool NS_x86::is_disp32 (Address a1, Address a2)
bool NS_x86::is_addr32 (Address addr)
COMMON_EXPORT void NS_x86::decode_SIB (unsigned sib, unsigned &scale, Register &index_reg, Register &base_reg)
COMMON_EXPORT const unsigned char * NS_x86::skip_headers (const unsigned char *, ia32_prefixes *=NULL)
Address NS_x86::region_lo (const Address)
Address NS_x86::region_hi (const Address)
COMMON_EXPORT bool NS_x86::insn_hasSIB (unsigned, unsigned &, unsigned &, unsigned &)
COMMON_EXPORT bool NS_x86::insn_hasDisp8 (unsigned ModRM)
COMMON_EXPORT bool NS_x86::insn_hasDisp32 (unsigned ModRM)
COMMON_EXPORT bool NS_x86::isStackFramePrecheck_msvs (const unsigned char *buffer)
COMMON_EXPORT bool NS_x86::isStackFramePrecheck_gcc (const unsigned char *buffer)

Variables

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

Define Documentation

#define AAA   (0x37)

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

#define ADC_AL_LB   (0x14)

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

#define ADC_EB_GB   (0x10)

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

#define ADC_EV_GV   (0x11)

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

#define ADC_GB_EB   (0x12)

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

#define ADC_GV_EV   (0x13)

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

#define ADC_RAX_LZ   (0x15)

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

#define ADD_AL_LB   (0x04)

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

#define ADD_EB_GB   (0x00)

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

#define ADD_EV_GV   (0x01)

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

#define ADD_GB_EB   (0x02)

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

#define ADD_GV_EV   (0x03)

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

#define ADD_RAX_LZ   (0x05)

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

#define AND_AL_LB   (0x24)

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

#define AND_EB_GB   (0x20)

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

#define AND_EV_GV   (0x21)

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

#define AND_GB_EB   (0x22)

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

#define AND_GV_EV   (0x23)

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

#define AND_RAX_LZ   (0x25)

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

#define byteSzB   (1)
#define CALL_ABS32_SZ   (11)

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

#define CALL_REL32_SZ   (5)

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

#define CALL_RELOC_THUNK   (13)

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

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

#define CALL_RM_OPC1   (0xFF)

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

#define CALL_RM_OPC2   (2)

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

#define CMP_AL_LB   (0x3C)

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

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

#define CMP_EB_GB   (0x38)

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

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

#define CMP_EV_GV   (0x39)

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

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

#define CMP_GB_EB   (0x3A)

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

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

#define CMP_GV_EV   (0x3B)

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

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

#define CMP_RAX_LZ   (0x3D)

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

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

#define DAA   (0x27)

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

#define DEC_EAX   (0x48)

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

#define DEC_EBP   (0x53)

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

#define DEC_EBX   (0x51)

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

#define DEC_ECX   (0x49)

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

#define DEC_EDI   (0x55)

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

#define DEC_EDX   (0x50)

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

#define DEC_ESI   (0x54)

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

#define DEC_ESP   (0x52)

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

#define dqwordSzB   (16)

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

Referenced by NS_x86::type2size().

#define dwordSzB   (4)
#define EXTENDED_0x81_ADD   0

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

#define EXTENDED_0x81_ADDC   2

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

#define EXTENDED_0x81_AND   4

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

#define EXTENDED_0x81_CMP   7

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

#define EXTENDED_0x81_OR   1

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

#define EXTENDED_0x81_SHIFT   3

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

#define EXTENDED_0x81_SUB   5

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

#define EXTENDED_0x81_XOR   6

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

#define EXTENDED_0x83_AND   4

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

#define FRSTOR   (0xDD)

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

#define FRSTOR_OP   (4)

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

#define FSAVE   (0x9BDD)

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

#define FSAVE_OP   (6)

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

#define FSAVE_STATE_SIZE   108

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

#define IA32_DECODE_CONDITION   (1<<5)

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

Referenced by NS_x86::instruction::getUsedRegs(), and NS_x86::ia32_decode().

#define IA32_DECODE_JMPS   (1<<3)

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

#define IA32_DECODE_MEMACCESS   (1<<4)

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

Referenced by NS_x86::instruction::getUsedRegs(), and NS_x86::ia32_decode().

#define IA32_DECODE_MNEMONICS   (1<<1)

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

#define IA32_DECODE_OPERANDS   (1<<2)

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

#define IA32_DECODE_PREFIXES   (1<<0)

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

#define IA32_FULL_DECODER   (IA32_DECODE_PREFIXES | IA32_DECODE_MNEMONICS | IA32_DECODE_OPERANDS | IA32_DECODE_JMPS | IA32_DECODE_MEMACCESS | IA32_DECODE_CONDITION)

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

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

#define IA32_SIZE_DECODER   0

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

#define ILLEGAL   (1<<6)
#define INC_EAX   (0x40)

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

#define INC_EBP   (0x45)

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

#define INC_EBX   (0x43)

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

#define INC_ECX   (0x41)

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

#define INC_EDI   (0x47)

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

#define INC_EDX   (0x42)

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

#define INC_ESI   (0x46)

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

#define INC_ESP   (0x44)

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

#define INDIR   (1<<14)
#define IS_CALL   (1<<1)
#define IS_JCC   (1<<5)
#define IS_JUMP   (1<<4)
#define IS_NOP   (1<<9)

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

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

#define IS_RET   (1<<2)

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

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

#define IS_RETC   (1<<8)

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

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

#define IS_RETF   (1<<3)

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

Referenced by NS_x86::instruction::isRetFar(), and NS_x86::instruction::isReturn().

#define JCXZ   (0xE3)

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

#define JE_R8   (0x74)

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

#define JG_R8   (0x7F)

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

#define JGE_R8   (0x7D)

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

#define JL_R8   (0x7C)

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

#define JLE_R8   (0x7E)

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

#define JNE_R8   (0x75)

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

#define JUMP_ABS32_SZ   (6)

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

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

#define JUMP_REL32_SZ   (6)

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

Referenced by NS_x86::is_disp32().

#define JUMP_RM_OPC1   (0xFF)

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

#define JUMP_RM_OPC2   (4)

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

#define JUMP_SZ   (5)
#define LEAVE   (0xC9)

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

#define MAX_IMM16   (32767)

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

#define MAX_IMM8   (127)

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

#define maxGPR   8

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

#define MIN_IMM16   (-32768)

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

#define MIN_IMM8   (-128)

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

#define MOV_R16_TO_RM16   (0x89)

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

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

#define MOV_R32_TO_RM32   (0x89)

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

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

#define MOV_R8_TO_RM8   (0x88)

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

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

#define MOV_RM16_TO_R16   (0x8b)

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

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

#define MOV_RM32_TO_R32   (0x8b)

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

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

#define MOV_RM8_TO_R8   (0x8A)

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

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

#define MOVREGMEM_REG   (0x8b)

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

#define NOP   (0x90)

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

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

#define OR_AL_LB   (0x0C)

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

#define OR_EB_GB   (0x08)

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

#define OR_EV_GV   (0x09)

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

#define OR_GB_EB   (0x0A)

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

#define OR_GV_EV   (0x0B)

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

#define OR_RAX_LZ   (0x0D)

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

#define POP_DS   (0X1F)

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

#define POP_EAX   (0x58)

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

#define POP_EBI   (0x5e)

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

#define POP_EBP   (0x5d)

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

#define POP_EBX   (0x5b)

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

#define POP_ECX   (0x59)

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

#define POP_EDI   (0x5f)

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

#define POP_EDX   (0x5A)

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

#define POP_ESP   (0x5c)

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

#define POPAD   (0x61)

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

#define POPES   (0x07)

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

#define POPFD   (0x9D)

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

#define POPSS   (0x17)

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

#define PREFIX_ADDR   (1<<23)

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

Referenced by NS_x86::count_prefixes(), and NS_x86::ia32_emulate_old_type().

#define PREFIX_BRANCH0   (unsigned char)(0x2E)

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

#define PREFIX_BRANCH1   (unsigned char)(0x3E)

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

#define PREFIX_INST   (1<<20)

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

Referenced by NS_x86::count_prefixes(), and NS_x86::ia32_emulate_old_type().

#define PREFIX_LOCK   (unsigned char)(0xF0)

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

Referenced by NS_x86::ia32_decode(), and NS_x86::ia32_decode_prefixes().

#define PREFIX_OPCODE   (1<<25)

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

Referenced by NS_x86::count_prefixes(), and NS_x86::ia32_emulate_old_type().

#define PREFIX_OPR   (1<<22)

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

Referenced by NS_x86::count_prefixes(), and NS_x86::ia32_emulate_old_type().

#define PREFIX_REP   (unsigned char)(0xF3)
#define PREFIX_REPNZ   (unsigned char)(0xF2)
#define PREFIX_REX   (1<<24)

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

Referenced by NS_x86::count_prefixes(), and NS_x86::ia32_emulate_old_type().

#define PREFIX_SEG   (1<<21)

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

Referenced by NS_x86::count_prefixes(), and NS_x86::ia32_emulate_old_type().

#define PREFIX_SEGCS   (unsigned char)(0x2E)

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

Referenced by NS_x86::ia32_decode_prefixes().

#define PREFIX_SEGDS   (unsigned char)(0x3E)

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

Referenced by NS_x86::ia32_decode_prefixes().

#define PREFIX_SEGES   (unsigned char)(0x26)

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

Referenced by NS_x86::ia32_decode_prefixes().

#define PREFIX_SEGFS   (unsigned char)(0x64)

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

Referenced by NS_x86::ia32_decode_prefixes().

#define PREFIX_SEGGS   (unsigned char)(0x65)

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

Referenced by NS_x86::ia32_decode_prefixes().

#define PREFIX_SEGSS   (unsigned char)(0x36)

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

Referenced by NS_x86::ia32_decode_prefixes().

#define PREFIX_SZADDR   (unsigned char)(0x67)
#define PREFIX_SZOPER   (unsigned char)(0x66)
#define PRVLGD   (1<<7)

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

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

#define PTR_WD   (1<<16)

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

Referenced by NS_x86::ia32_emulate_old_type().

#define PTR_WW   (1<<15)

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

Referenced by NS_x86::ia32_emulate_old_type().

#define PTR_WX   (1<<17)

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

Referenced by NS_x86::ia32_emulate_old_type().

#define PUSH_DS   (0x1E)

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

#define PUSH_EBP   (0x50+REGNUM_EBP)

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

#define PUSH_RM_OPC1   (0xFF)

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

#define PUSH_RM_OPC2   (6)

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

#define PUSHAD   (0x60)

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

#define PUSHCS   (0x0E)

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

#define PUSHEAX   (0x50)

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

#define PUSHEBP   (0x55)

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

#define PUSHEBX   (0x53)

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

#define PUSHECX   (0x51)

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

#define PUSHEDI   (0x57)

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

#define PUSHEDX   (0x52)

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

#define PUSHES   (0x06)

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

#define PUSHESI   (0x56)

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

#define PUSHESP   (0x54)

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

#define PUSHFD   (0x9C)

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

#define PUSHSS   (0x16)

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

#define qwordSzB   (8)

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

Referenced by NS_x86::type2size().

#define READ_OP   0

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

#define REGNUM_EAX   0

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

#define REGNUM_EBP   5

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

#define REGNUM_EBX   3

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

#define REGNUM_ECX   1

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

#define REGNUM_EDI   7

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

#define REGNUM_EDX   2

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

#define REGNUM_ESI   6

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

#define REGNUM_ESP   4

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

#define REL_B   (1<<10)

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

Referenced by NS_x86::displacement(), and NS_x86::instruction::spaceToRelocate().

#define REL_D   (1<<12)
#define REL_D_DATA   (1<<18)
#define REL_W   (1<<11)
#define REL_X   (1<<13)

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

Referenced by NS_x86::ia32_emulate_old_type().

#define SBB_AL_LB   (0x1C)

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

#define SBB_EB_GB   (0x18)

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

#define SBB_EV_GV   (0x19)

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

#define SBB_GB_EB   (0x1A)

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

#define SBB_GV_EV   (0x1B)

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

#define SBB_RAX_LZ   (0x1D)

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

#define SEG_ES   (0x26)

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

#define SEG_SS   (0x36)

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

#define SUB_AL_LB   (0x2C)

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

#define SUB_EB_GB   (0x28)

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

#define SUB_EV_GV   (0x29)

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

#define SUB_GB_EB   (0x2A)

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

#define SUB_GV_EV   (0x2B)

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

#define SUB_RAX_LZ   (0x2D)

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

#define SUB_REG_IMM32   (5)

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

#define TEST_EV_GV   (0x85)

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

#define TWO_BYTE_OPCODE   (0x0F)

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

#define wordSzB   (2)
#define WRITE_OP   1

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

#define XOR_AL_LB   (0x34)

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

#define XOR_EB_GB   (0x30)

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

#define XOR_EV_GV   (0x31)

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

#define XOR_GB_EB   (0x32)

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

#define XOR_GV_EV   (0x33)

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

#define XOR_R16_RM16   (0x33)

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

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

#define XOR_R32_RM32   (0x33)

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

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

#define XOR_R8_RM8   (0x32)

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

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

#define XOR_RAX_LZ   (0x35)

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

#define XOR_RM16_R16   (0x31)

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

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

#define XOR_RM32_R32   (0x31)

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

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

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

Generated on 12 Jul 2013 for SymtabAPI by  doxygen 1.6.1