Pin
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
Typedefs | Enumerations | Functions | Variables
reg_ia32.cpp File Reference
#include "level_base_with_ia32_ins.H"

Typedefs

typedef UINT8 LEVEL_BASE::REGTYPE
 

Enumerations

enum  LEVEL_BASE::REG {
  REG_INVALID_ = 0,
  REG_GR_BASE = REG_RBASE,
  REG_EDI = REG_GR_BASE,
  REG_GDI = REG_EDI,
  REG_ESI,
  REG_GSI = REG_ESI,
  REG_EBP,
  REG_GBP = REG_EBP,
  REG_ESP,
  REG_STACK_PTR = REG_ESP,
  REG_EBX,
  REG_GBX = REG_EBX,
  REG_EDX,
  REG_GDX = REG_EDX,
  REG_ECX,
  REG_GCX = REG_ECX,
  REG_EAX,
  REG_GAX = REG_EAX,
  REG_GR_LAST = REG_EAX,
  REG_SEG_BASE,
  REG_SEG_CS = REG_SEG_BASE,
  REG_SEG_SS,
  REG_SEG_DS,
  REG_SEG_ES,
  REG_SEG_FS,
  REG_SEG_GS,
  REG_SEG_LAST = REG_SEG_GS,
  REG_EFLAGS,
  REG_GFLAGS =REG_EFLAGS,
  REG_EIP,
  REG_INST_PTR = REG_EIP,
  REG_AL,
  REG_AH,
  REG_AX,
  REG_CL,
  REG_CH,
  REG_CX,
  REG_DL,
  REG_DH,
  REG_DX,
  REG_BL,
  REG_BH,
  REG_BX,
  REG_BP,
  REG_SI,
  REG_DI,
  REG_SP,
  REG_FLAGS,
  REG_IP,
  REG_MM_BASE,
  REG_MM0 = REG_MM_BASE,
  REG_MM1,
  REG_MM2,
  REG_MM3,
  REG_MM4,
  REG_MM5,
  REG_MM6,
  REG_MM7,
  REG_MM_LAST = REG_MM7,
  REG_EMM_BASE,
  REG_EMM0 = REG_EMM_BASE,
  REG_EMM1,
  REG_EMM2,
  REG_EMM3,
  REG_EMM4,
  REG_EMM5,
  REG_EMM6,
  REG_EMM7,
  REG_EMM_LAST = REG_EMM7,
  REG_X87,
  REG_XMM_BASE,
  REG_FIRST_FP_REG = REG_XMM_BASE,
  REG_XMM0 = REG_XMM_BASE,
  REG_XMM1,
  REG_XMM2,
  REG_XMM3,
  REG_XMM4,
  REG_XMM5,
  REG_XMM6,
  REG_XMM7,
  REG_XMM_LAST = REG_XMM7,
  REG_YMM_BASE,
  REG_YMM0 = REG_YMM_BASE,
  REG_YMM1,
  REG_YMM2,
  REG_YMM3,
  REG_YMM4,
  REG_YMM5,
  REG_YMM6,
  REG_YMM7,
  REG_YMM_LAST = REG_YMM7,
  REG_ZMM_BASE,
  REG_ZMM_LAST = REG_ZMM_BASE,
  REG_K_BASE,
  REG_K_LAST = REG_K_BASE,
  REG_MXCSR,
  REG_MXCSRMASK,
  REG_ORIG_EAX,
  REG_ORIG_GAX = REG_ORIG_EAX,
  REG_DR_BASE,
  REG_DR0 = REG_DR_BASE,
  REG_DR1,
  REG_DR2,
  REG_DR3,
  REG_DR4,
  REG_DR5,
  REG_DR6,
  REG_DR7,
  REG_DR_LAST = REG_DR7,
  REG_CR_BASE,
  REG_CR0 = REG_CR_BASE,
  REG_CR1,
  REG_CR2,
  REG_CR3,
  REG_CR4,
  REG_CR_LAST = REG_CR4,
  REG_TSSR,
  REG_LDTR,
  REG_TR_BASE,
  REG_TR = REG_TR_BASE,
  REG_TR3,
  REG_TR4,
  REG_TR5,
  REG_TR6,
  REG_TR7,
  REG_TR_LAST = REG_TR7,
  REG_FPST_BASE,
  REG_FPSTATUS_BASE = REG_FPST_BASE,
  REG_FPCW = REG_FPSTATUS_BASE,
  REG_FPSW,
  LEVEL_BASE::REG_FPTAG,
  REG_FPIP_OFF,
  REG_FPIP_SEL,
  REG_FPOPCODE,
  REG_FPDP_OFF,
  REG_FPDP_SEL,
  REG_FPSTATUS_LAST = REG_FPDP_SEL,
  LEVEL_BASE::REG_FPTAG_FULL,
  REG_ST_BASE,
  REG_ST0 = REG_ST_BASE,
  REG_ST1,
  REG_ST2,
  REG_ST3,
  REG_ST4,
  REG_ST5,
  REG_ST6,
  REG_ST7,
  REG_ST_LAST = REG_ST7,
  REG_FPST_LAST = REG_ST_LAST,
  LEVEL_BASE::REG_SEG_GS_BASE,
  LEVEL_BASE::REG_SEG_FS_BASE,
  REG_INST_BASE,
  LEVEL_BASE::REG_INST_SCRATCH_BASE = REG_INST_BASE,
  LEVEL_BASE::REG_INST_G0 = REG_INST_SCRATCH_BASE,
  LEVEL_BASE::REG_INST_G1,
  LEVEL_BASE::REG_INST_G2,
  LEVEL_BASE::REG_INST_G3,
  LEVEL_BASE::REG_INST_G4,
  LEVEL_BASE::REG_INST_G5,
  LEVEL_BASE::REG_INST_G6,
  LEVEL_BASE::REG_INST_G7,
  LEVEL_BASE::REG_INST_G8,
  LEVEL_BASE::REG_INST_G9,
  LEVEL_BASE::REG_INST_G10,
  LEVEL_BASE::REG_INST_G11,
  LEVEL_BASE::REG_INST_G12,
  LEVEL_BASE::REG_INST_G13,
  LEVEL_BASE::REG_INST_G14,
  LEVEL_BASE::REG_INST_G15,
  LEVEL_BASE::REG_INST_G16,
  LEVEL_BASE::REG_INST_G17,
  LEVEL_BASE::REG_INST_G18,
  LEVEL_BASE::REG_INST_G19,
  LEVEL_BASE::REG_INST_G20,
  LEVEL_BASE::REG_INST_G21,
  LEVEL_BASE::REG_INST_G22,
  LEVEL_BASE::REG_INST_G23,
  LEVEL_BASE::REG_INST_G24,
  LEVEL_BASE::REG_INST_G25,
  LEVEL_BASE::REG_INST_G26,
  LEVEL_BASE::REG_INST_G27,
  LEVEL_BASE::REG_INST_G28,
  LEVEL_BASE::REG_INST_G29,
  REG_INST_TOOL_FIRST = REG_INST_G0,
  REG_INST_TOOL_LAST = REG_INST_G29,
  REG_BUF_BASE0,
  REG_BUF_BASE1,
  REG_BUF_BASE2,
  REG_BUF_BASE3,
  REG_BUF_BASE4,
  REG_BUF_BASE5,
  REG_BUF_BASE6,
  REG_BUF_BASE7,
  REG_BUF_BASE8,
  REG_BUF_BASE9,
  REG_BUF_BASE_LAST = REG_BUF_BASE9,
  REG_BUF_END0,
  REG_BUF_END1,
  REG_BUF_END2,
  REG_BUF_END3,
  REG_BUF_END4,
  REG_BUF_END5,
  REG_BUF_END6,
  REG_BUF_END7,
  REG_BUF_END8,
  REG_BUF_END9,
  REG_BUF_ENDLAST = REG_BUF_END9,
  REG_BUF_LAST = REG_BUF_ENDLAST,
  REG_INST_SCRATCH_LAST = REG_BUF_ENDLAST,
  REG_LAST
}
 
enum  LEVEL_BASE::REGNAME { REGNAME_LAST }
 

Functions

VOID LEVEL_BASE::InitRegTables ()
 
BOOL LEVEL_BASE::REG_is_reg (REG reg)
 
BOOL LEVEL_BASE::REG_is_pseudo (REG reg)
 
BOOL LEVEL_BASE::REG_is_gr (REG reg)
 
BOOL LEVEL_BASE::REG_is_fr (REG reg)
 
BOOL LEVEL_BASE::REG_is_br (REG reg)
 
BOOL LEVEL_BASE::REG_is_gr64 (REG reg)
 
REG LEVEL_BASE::operator++ (REG &r)
 
BOOL LEVEL_BASE::REG_is_gr32 (REG reg)
 
BOOL LEVEL_BASE::REG_is_gr16 (REG reg)
 
BOOL LEVEL_BASE::REG_is_gr8 (REG reg)
 
BOOL LEVEL_BASE::REG_is_seg (REG reg)
 
BOOL LEVEL_BASE::REG_is_fr_for_get_context (REG reg)
 
BOOL LEVEL_BASE::REG_is_fr_or_x87 (REG reg)
 
BOOL LEVEL_BASE::REG_is_mxcsr (REG reg)
 
BOOL LEVEL_BASE::REG_is_any_mxcsr (REG reg)
 
BOOL LEVEL_BASE::REG_is_any_x87 (REG reg)
 
REG LEVEL_BASE::REG_st_return_reg ()
 
BOOL LEVEL_BASE::REG_is_mm (REG reg)
 
BOOL LEVEL_BASE::REG_is_emm (REG reg)
 
BOOL LEVEL_BASE::REG_is_xmm (REG reg)
 
BOOL LEVEL_BASE::REG_is_ymm (REG reg)
 
BOOL LEVEL_BASE::REG_is_zmm (REG reg)
 
BOOL LEVEL_BASE::REG_is_xmm_ymm_zmm (REG reg)
 
BOOL LEVEL_BASE::REG_is_k_mask (REG reg)
 
REG LEVEL_BASE::REG_corresponding_ymm_reg (REG reg)
 
BOOL LEVEL_BASE::REG_is_dr (REG reg)
 
BOOL LEVEL_BASE::REG_is_cr (REG reg)
 
BOOL LEVEL_BASE::REG_is_tr (REG reg)
 
BOOL LEVEL_BASE::REG_is_st (REG reg)
 
BOOL LEVEL_BASE::REG_is_fpst (REG reg)
 
BOOL LEVEL_BASE::REG_is_in_X87 (REG reg)
 
BOOL LEVEL_BASE::REG_is_machine (REG reg)
 
BOOL LEVEL_BASE::REG_is_application (REG reg)
 
BOOL LEVEL_BASE::REG_valid_for_iarg_reg_value (REG reg)
 
BOOL LEVEL_BASE::REG_is_pin (REG reg)
 
BOOL LEVEL_BASE::REG_is_pin_gr (REG reg)
 
BOOL LEVEL_BASE::REG_is_pin_xmm (REG reg)
 
BOOL LEVEL_BASE::REG_is_pin_ymm (REG reg)
 
BOOL LEVEL_BASE::REG_is_pin_zmm (REG reg)
 
BOOL LEVEL_BASE::REG_is_pin_k_mask (REG reg)
 
BOOL LEVEL_BASE::REG_is_seg_base (REG reg)
 
BOOL LEVEL_BASE::REG_is_gr_type (REG reg)
 
REG LEVEL_BASE::REG_AppFlags ()
 
BOOL LEVEL_BASE::REG_is_flags (REG reg)
 
BOOL LEVEL_BASE::REG_is_pin_flags (REG reg)
 
BOOL LEVEL_BASE::REG_is_status_flags (REG reg)
 
BOOL LEVEL_BASE::REG_is_pin_status_flags (REG reg)
 
BOOL LEVEL_BASE::REG_is_df_flag (REG reg)
 
BOOL LEVEL_BASE::REG_is_pin_df_flag (REG reg)
 
BOOL LEVEL_BASE::REG_is_flags_type (REG reg)
 
BOOL LEVEL_BASE::REG_is_flags_any_size_type (REG reg)
 
BOOL LEVEL_BASE::REG_is_status_flags_type (REG reg)
 
BOOL LEVEL_BASE::REG_is_app_status_flags_type (REG reg)
 
BOOL LEVEL_BASE::REG_is_df_flag_type (REG reg)
 
BOOL LEVEL_BASE::REG_is_app_df_flag_type (REG reg)
 
BOOL LEVEL_BASE::REG_is_any_flags_type (REG reg)
 
BOOL LEVEL_BASE::REG_is_any_pin_flags (REG reg)
 
BOOL LEVEL_BASE::REG_is_any_app_flags (REG reg)
 
REG LEVEL_BASE::REG_get_status_flags_reg_of_type (REG reg)
 
REG LEVEL_BASE::REG_get_df_flag_reg_of_type (REG reg)
 
REG LEVEL_BASE::REG_get_full_flags_reg_of_type (REG reg)
 
BOOL LEVEL_BASE::REG_is_stackptr_type (REG reg)
 
BOOL LEVEL_BASE::REG_is_representative_reg (REG reg)
 
BOOL LEVEL_BASE::REG_is_x87_reg (REG reg)
 
BOOL LEVEL_BASE::REG_is_pin_inst (REG reg)
 
BOOL LEVEL_BASE::REG_is_buffer (REG reg)
 
BOOL LEVEL_BASE::REG_is_inst_scratch (REG reg)
 
ADDRINT LEVEL_BASE::REG_regSubClassBitMapTable ()
 
ADDRINT LEVEL_BASE::REG_regDefTable ()
 
BOOL LEVEL_BASE::REG_is_pin_tmp (REG reg)
 
REG LEVEL_BASE::REG_INVALID ()
 
BOOL LEVEL_BASE::REG_valid (REG reg)
 
UINT32 LEVEL_BASE::REG_SpilledSize (const REG reg)
 
UINT32 LEVEL_BASE::REG_SpilledAlignment (const REG reg)
 
REG LEVEL_BASE::REG_PinToMachine (const REG reg, BOOL strict)
 
REG LEVEL_BASE::REG_MachineToPin (const REG reg)
 
BOOL LEVEL_BASE::REG_is_pin64 (REG reg)
 
BOOL LEVEL_BASE::REG_RequiresRex (const REG reg)
 
REGWIDTH LEVEL_BASE::REG_WidthOfGr (REG reg)
 
REGWIDTH LEVEL_BASE::REGWIDTH_FromByteWidth (UINT32 byteWidth)
 
INT32 LEVEL_BASE::BitWidth_FromREGWIDTH (REGWIDTH regWidth)
 
UINT32 LEVEL_BASE::REG_Size (REG reg)
 
REG LEVEL_BASE::REG_FullRegName (const REG reg)
 
string LEVEL_BASE::REG_StringShort (REG reg)
 
BOOL LEVEL_BASE::REG_SameType (const REG vreg, const REG preg)
 
REG LEVEL_BASE::REG_IdentityCopy (const REG reg)
 
REG LEVEL_BASE::REG_SpillPtr ()
 
REG LEVEL_BASE::REG_PinToMachineAndSpillPtr (const REG reg, BOOL strict)
 
UINT32 LEVEL_BASE::REG_SizeFromREGWIDTH (REGWIDTH width)
 
INT32 LEVEL_BASE::REG_NmCondCallThenExtraReadRegs ()
 
INT32 LEVEL_BASE::REG_NmCondCallThenExtraWriteRegs ()
 
REG LEVEL_BASE::REG_GetCondCallExtraRegRead (INT32 index)
 
REG LEVEL_BASE::REG_GetCondCallExtraRegWritten (INT32 index)
 

Variables

GLOBALCONST ADDRINT LEVEL_BASE::AC_FLAG_BIT = 0x40000
 
GLOBALCONST ADDRINT LEVEL_BASE::NUM_PHYSICAL_REGS = REG_PHYSICAL_CONTEXT_END - REG_PHYSICAL_CONTEXT_BEGIN + 1
 
GLOBALCONST ADDRINT LEVEL_BASE::NUM_SCRATCH_REGS = REG_INST_SCRATCH_LAST - REG_INST_SCRATCH_BASE + 1
 
GLOBALCONST ADDRINT LEVEL_BASE::NUM_SPECIAL_REGS = 2 + NUM_SCRATCH_REGS
 
GLOBALCONST ADDRINT LEVEL_BASE::NUM_CONTEXT_INT_REGS = NUM_PHYSICAL_REGS + NUM_SPECIAL_REGS
 
GLOBALCONST ADDRINT LEVEL_BASE::ARCH_STATE_SIZE
 
GLOBALCONST UINT32 LEVEL_BASE::NUM_BUFFER_REGS = REG_BUF_LAST - REG_BUF_BASE0 + 1
 
const REGDEF_ENTRY LEVEL_BASE::_regDefTable []
 
UINT64 LEVEL_BASE::_regClassBitMapTable [REG_LAST]
 
UINT64 LEVEL_BASE::_regSubClassBitMapTable [REG_LAST]
 
UINT32 LEVEL_BASE::_regSpillSizeTable [REG_LAST]
 
REGWIDTH LEVEL_BASE::_regWidthTable [REG_LAST]
 
REG_ALLOC_TYPE LEVEL_BASE::_regAllocTypeTable [REG_LAST]
 
REG LEVEL_BASE::_regFullNameTable [REG_LAST]
 
REG LEVEL_BASE::_regMachineNameTable [REG_LAST]
 
REG LEVEL_BASE::_regPinNameTable [REG_LAST]
 
INT32 LEVEL_BASE::_regWidthToBitWidth []
 
GLOBALCONST UINT32 LEVEL_BASE::OPCODE_TABLE_NREADS = (11)
 
GLOBALCONST UINT32 LEVEL_BASE::OPCODE_TABLE_NWRITES = (9)
 

Detailed Description

This file contains REG primitives