A high-level class representing a single machine instruction in a platform-independent manner. It provides useful methods for accessing useful information about the instruction.
Constructor | Description |
|
|
Instance member | Description |
|
|
Full Usage:
this.Decompose(arg1)
Parameters:
bool
Returns: AsmWord[]
Returns an array of AsmWords.
Modifiers: abstract |
|
Full Usage:
this.DirectBranchTarget(addr)
Parameters:
byref<Addr>
Returns: bool
Returns true if a target address exists. Otherwise, returns false.
Modifiers: abstract |
|
Full Usage:
this.Disasm()
Returns: string
Returns a disassembled string.
Modifiers: abstract |
|
Full Usage:
this.Disasm(showAddr, resolveSymbol, disasmHelper)
Parameters:
bool
-
Whether to show the instruction address in the resulting disassembly.
resolveSymbol : bool
-
Whether to resolve symbols while disassembling the instruction. For
example, when there is a call target, we the disassembled string will
show the target function name if this parameter is true, and the symbol
information exists.
disasmHelper : DisasmHelper
-
The helper allows our disassembler to resolve symbols.
Returns: string
Returns a disassembled string.
Modifiers: abstract |
|
|
Return a sequence of possible next instruction addresses along with their ArchOperationMode. For branch instructions, the returned sequence includes jump target(s). For regular instructions, the sequence is a singleton of the fall-through address. This function does not resolve indirect branch targets.
|
Full Usage:
this.Immediate(v)
Parameters:
byref<int64>
Returns: bool
Returns true if an immediate exists. Otherwise, returns false.
Modifiers: abstract |
Return an integer immediate value of the instruction if there is one. This function will ignore floating-point immediate values.
|
Full Usage:
this.IndirectTrampolineAddr(addr)
Parameters:
byref<Addr>
Returns: bool
Returns true if a trampoline address exists. Otherwise, returns false.
Modifiers: abstract |
Return a trampoline address of an indirect branch instruction if we can directly compute the address. For example, `JMP [RIP + 0x42]` is an indirect branch instruction, but we can compute the trampoline address as RIP is statically known anyways when PIC is off.
|
Full Usage:
this.InterruptNum(num)
Parameters:
byref<int64>
Returns: bool
Modifiers: abstract |
|
Full Usage:
this.IsBBLEnd()
Returns: bool
Returns true if this instruction should be at the end of the
corresponding basic block.
Modifiers: abstract |
Does this instruction end a basic block? For example, this function returns true for branch instructions and exit instructions. We also consider system call instructions as an end of basic blocks.
|
Full Usage:
this.IsBranch()
Returns: bool
Returns true if this is a branch instruction.
Modifiers: abstract |
Is this a branch instruction? A branch instruction includes any kinds of jump instructions, such as CALL/RET instructions, indirect/direct jump instructions, and conditional jump instructions.
|
Full Usage:
this.IsCJmpOnTrue()
Returns: bool
Returns true if this is a conditional branch instruction, and jumps to
the target when the predicate is true.
Modifiers: abstract |
Is this a conditional branch instruction, and it jumps to the branch
target when the predicate is true? For example, this method returns true
for
|
Full Usage:
this.IsCall()
Returns: bool
Returns true if this is a call instruction.
Modifiers: abstract |
|
Full Usage:
this.IsCondBranch()
Returns: bool
Returns true if this is a conditional branch instruction.
Modifiers: abstract |
|
Full Usage:
this.IsDirectBranch()
Returns: bool
Returns true if this is a direct branch instruction.
Modifiers: abstract |
Is this a direct branch instruction? A direct branch instruction is a
branch instruction with a concrete jump target, which is inscribed in
its operand. For example,
|
Full Usage:
this.IsExit()
Returns: bool
Returns true if this instruction should be at the end of the
corresponding basic block.
Modifiers: abstract |
Does this instruction exits the program execution? For example, this
function returns true for the
|
Full Usage:
this.IsIndirectBranch()
Returns: bool
Returns true if this is an indirect branch instruction.
Modifiers: abstract |
Is this an indirect branch instruction? An indirect branch instruction is a branch instruction with a symbolic jump target. Thus, the jump target is only computed at runtime.
|
Full Usage:
this.IsInlinedAssembly()
Returns: bool
Modifiers: abstract |
|
Full Usage:
this.IsInterrupt()
Returns: bool
Returns true if this is an interrupt instruction
Modifiers: abstract |
|
Full Usage:
this.IsModeChanging()
Returns: bool
Returns true if this is a mode-changing instruction.
Modifiers: abstract |
|
Full Usage:
this.IsNop()
Returns: bool
Returns true if this instruction is a NO-OP.
Modifiers: abstract |
|
Full Usage:
this.IsRET()
Returns: bool
Returns true if this is a return instruction.
Modifiers: abstract |
|
Full Usage:
this.Length
Returns: uint32
|
|
Full Usage:
this.Translate(ctxt)
Parameters:
TranslationContext
-
Translation context.
Returns: Stmt[]
Returns an array of LowUIR statements.
Modifiers: abstract |
|
|
The word size used for translating this instruction. Some architectures have several representations of their instruction sets depending on the word size. For example, Intel can be represented as either x86 or x86-64 depending on the word size used. We store this information per instruction to distinguish specific instruction sets used.
|