microprobe.code.ins.Instruction
- class Instruction[source]
Bases:
Pickable
Class to represent an instruction
Methods
__init__
()add_allow_register
(reg)add_comment
(comment)add_decorator
(name, value)allows
(reg)assembly
()Assembly representation of the instruction.
binary
()Binary representation of the instruction.
check_context
(context)copy
()Return a copy of the instruction.
Instruction memory operands.
operand_by_field
(fieldname)Instruction field names of the operands.
operands
()Instruction operands.
register_context_callback
(key, ...)rm_decorator
(name)set_address
(address)set_arch_type
(instrtype)set_label
(label)set_operands
(values[, context, check])sets
()Return the list of registers set by the instruction.
Unset instruction address.
uses
()Return the list of registers used by the instruction.
Attributes
Instruction address (
InstructionAddress
)List of allowed registers of the instructon.
Instruction architecture type (
InstructionType
).List of comments of the instruction (
list
).Returns the list of context callbacks registered.
Instruction decorators (
dict
).Instruction label (
str
).
- register_context_callback(key, checking_function, fixing_function)[source]
- Parameters:
key
checking_function
fixing_function
- property context_callbacks
Returns the list of context callbacks registered.
- property architecture_type
Instruction architecture type (
InstructionType
).
- property allowed_regs
List of allowed registers of the instructon.
- property address
Instruction address (
InstructionAddress
)