microprobe.code.ins.Instruction
- class Instruction[source]
Bases:
Pickable
Class to represent an instruction
Methods
__init__
()add_allow_register
(reg)- param reg:
add_comment
(comment)- param comment:
add_decorator
(name, value)- param key:
decorator name
allows
(reg)- param reg:
assembly
()Assembly representation of the instruction.
binary
()Binary representation of the instruction.
check_context
(context)- param context:
copy
()Return a copy of the instruction.
Instruction memory operands.
operand_by_field
(fieldname)- param fieldname:
Instruction field names of the operands.
operands
()Instruction operands.
register_context_callback
(key, ...)- param key:
rm_decorator
(name)set_address
(address)- param address:
set_arch_type
(instrtype)- param instrtype:
set_label
(label)- param label:
set_operands
(values[, context, check])- param values:
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
)