|
INT32 | LEVEL_CORE::INS_Category (const INS ins) |
|
INT32 | LEVEL_CORE::INS_Extension (const INS ins) |
|
USIZE | LEVEL_CORE::INS_MemoryOperandSize (INS ins, UINT32 memoryOp) |
|
USIZE | LEVEL_CORE::INS_MemoryOperandElementSize (INS ins, UINT32 memoryOp) |
|
PIN_DEPRECATED_API USIZE | LEVEL_CORE::INS_MemoryWriteSize (INS ins) |
|
PIN_DEPRECATED_API USIZE | LEVEL_CORE::INS_MemoryReadSize (INS ins) |
|
PREDICATE | LEVEL_CORE::INS_GetPredicate (INS ins) |
|
BOOL | LEVEL_CORE::INS_IsMemoryRead (INS ins) |
|
BOOL | LEVEL_CORE::INS_IsMemoryWrite (INS ins) |
|
BOOL | LEVEL_CORE::INS_HasMemoryRead2 (INS ins) |
|
BOOL | LEVEL_CORE::INS_HasFallThrough (INS ins) |
|
BOOL | LEVEL_CORE::INS_IsLea (INS ins) |
|
BOOL | LEVEL_CORE::INS_IsNop (INS ins) |
|
std::string | LEVEL_CORE::OPCODE_StringShort (UINT32 opcode) |
|
std::string | LEVEL_CORE::INS_Mnemonic (INS ins) |
|
BOOL | LEVEL_CORE::INS_IsBranch (INS ins) |
|
BOOL | LEVEL_CORE::INS_IsDirectBranch (INS ins) |
|
BOOL | LEVEL_CORE::INS_IsDirectCall (INS ins) |
|
PIN_DEPRECATED_API BOOL | LEVEL_CORE::INS_IsDirectBranchOrCall (INS ins) |
|
BOOL | LEVEL_CORE::INS_IsDirectControlFlow (INS ins) |
|
PIN_DEPRECATED_API BOOL | LEVEL_CORE::INS_IsBranchOrCall (INS ins) |
|
BOOL | LEVEL_CORE::INS_Stutters (INS ins) |
|
BOOL | LEVEL_CORE::INS_IsCall (INS ins) |
|
BOOL | LEVEL_CORE::INS_IsControlFlow (INS ins) |
|
BOOL | LEVEL_CORE::INS_IsValidForIpointAfter (INS ins) |
|
BOOL | LEVEL_CORE::INS_IsValidForIpointTakenBranch (INS ins) |
|
BOOL | LEVEL_CORE::INS_IsProcedureCall (INS ins) |
|
BOOL | LEVEL_CORE::INS_IsRet (INS ins) |
|
BOOL | LEVEL_CORE::INS_IsSysret (INS ins) |
|
BOOL | LEVEL_CORE::INS_IsPrefetch (INS ins) |
|
BOOL | LEVEL_CORE::INS_IsAtomicUpdate (const INS ins) |
|
PIN_DEPRECATED_API BOOL | LEVEL_CORE::INS_IsIndirectBranchOrCall (INS ins) |
|
BOOL | LEVEL_CORE::INS_IsIndirectControlFlow (INS ins) |
|
BOOL | LEVEL_CORE::INS_HasExplicitMemoryReference (INS ins) |
|
REG | LEVEL_CORE::INS_RegR (INS x, UINT32 k) |
|
REG | LEVEL_CORE::INS_RegW (INS x, UINT32 k) |
|
OPCODE | LEVEL_CORE::INS_Opcode (INS ins) |
|
std::string | LEVEL_CORE::CATEGORY_StringShort (UINT32 num) |
|
std::string | LEVEL_CORE::EXTENSION_StringShort (UINT32 num) |
|
UINT32 | LEVEL_CORE::INS_MaxNumRRegs (INS x) |
|
UINT32 | LEVEL_CORE::INS_MaxNumWRegs (INS x) |
|
BOOL | LEVEL_CORE::INS_RegRContain (const INS ins, const REG reg) |
|
BOOL | LEVEL_CORE::INS_RegWContain (const INS ins, const REG reg) |
|
BOOL | LEVEL_CORE::INS_IsStackRead (const INS ins) |
|
BOOL | LEVEL_CORE::INS_IsStackWrite (const INS ins) |
|
BOOL | LEVEL_CORE::INS_IsIpRelRead (const INS ins) |
|
BOOL | LEVEL_CORE::INS_IsIpRelWrite (const INS ins) |
|
BOOL | LEVEL_CORE::INS_IsPredicated (INS ins) |
|
BOOL | LEVEL_CORE::INS_IsOriginal (INS ins) |
|
std::string | LEVEL_CORE::INS_Disassemble (INS ins) |
|
xed_decoded_inst_t * | LEVEL_CORE::INS_XedDec (INS ins) |
|
REG | LEVEL_CORE::INS_XedExactMapToPinReg (xed_reg_enum_t xed_reg) |
|
PIN_DEPRECATED_API REG | LEVEL_CORE::INS_XedExactMapToPinReg (unsigned int r) |
|
xed_reg_enum_t | LEVEL_CORE::INS_XedExactMapFromPinReg (REG pin_reg) |
|
UINT32 | LEVEL_CORE::INS_MemoryOperandCount (INS ins) |
|
UINT32 | LEVEL_CORE::INS_MemoryOperandElementCount (INS ins, UINT32 memoryOp) |
|
BOOL | LEVEL_CORE::INS_OperandIsAddressGenerator (INS ins, UINT32 n) |
|
BOOL | LEVEL_CORE::INS_MemoryOperandIsRead (INS ins, UINT32 memopIdx) |
|
BOOL | LEVEL_CORE::INS_MemoryOperandIsWritten (INS ins, UINT32 memopIdx) |
|
BOOL | LEVEL_CORE::INS_IsSyscall (INS ins) |
|
SYSCALL_STANDARD | LEVEL_CORE::INS_SyscallStd (INS ins) |
|
RTN | LEVEL_PINCLIENT::INS_Rtn (INS x) |
|
INS | LEVEL_PINCLIENT::INS_Next (INS x) |
|
INS | LEVEL_PINCLIENT::INS_Prev (INS x) |
|
INS | LEVEL_PINCLIENT::INS_Invalid () |
|
BOOL | LEVEL_PINCLIENT::INS_Valid (INS x) |
|
ADDRINT | LEVEL_PINCLIENT::INS_Address (INS ins) |
|
USIZE | LEVEL_PINCLIENT::INS_Size (INS ins) |
|
PIN_DEPRECATED_API ADDRINT | LEVEL_PINCLIENT::INS_DirectBranchOrCallTargetAddress (INS ins) |
|
ADDRINT | LEVEL_PINCLIENT::INS_DirectControlFlowTargetAddress (INS ins) |
|
ADDRINT | LEVEL_PINCLIENT::INS_NextAddress (INS ins) |
|
Use these functions to examine an instruction. They work for all instruction sets.
INT32 LEVEL_CORE::INS_Category |
( |
const INS |
ins | ) |
|
The category of an instruction is a higher level semantic description of an instruction than its opcode (INS_Opcode). So, for instance, you can test for a conditional branch by using INS_Category(ins) == XED_CATEGORY_COND_BR, whereas using INS_Opcode(ins) would require that you enumerate all twenty conditional branch opcodes.
The full mapping of opcodes to categories can be found in the idata.txt file in the Intel(R) X86 Encoder Decoder distribution (which is distributed as part of the Pin kit). The category enumeration can be found in the file "xed-category-enum.h".
A category can be converted into a string by using CATEGORY_StringShort.
- Returns
- Instruction category
BOOL LEVEL_CORE::INS_HasFallThrough |
( |
INS |
ins | ) |
|
If INS_HasFallThrough(INS) is TRUE, then the instruction may execute the "natural" next instruction (i.e. the one which starts immediately after this one), if it is FALSE, then the instruction following the one tested will not (normally) be executed next. So HasFallThrough is TRUE for instructions which don't change the control flow (most instructions), or for conditional branches (which might change the control flow, but might not), and FALSE for unconditional branches and calls (where the next instruction to be executed is always explicitly specified).
Note that an unconditional branch or call to the next instruction still doesn't have a fall-through, since a fall through is the implicitly following instruction, and an unconditional branch never uses that.
- Returns
- true if the instruction type has a fallthrough path based on the opcode
- Note
- for system calls function returns false.
std::string LEVEL_CORE::INS_Mnemonic |
( |
INS |
ins | ) |
|
Only use this function if you really want a printable version of the instruction's opcode.
If you are trying to test what the opcode of an instruction is, use INS_Opcode and compare it with one of the XED_ICLASS values, or use one of the INS_Is... calls such as INS_IsMov, rather than using this function and comparing a string. Generating and comparing strings is much slower than comparing small integer values!
- Returns
- String form of mnemonic