microprobe.code.ins
microprobe.code.ins module
Functions
|
|
|
Return a instruction of the given instruction type. |
|
Return the instruction from a definition. |
|
Set instruction properties from an intruction definition. |
|
Return the definition of an instruction. |
|
Classes
Class to represent an instruction |
|
Class to represent an instruction operand value |
|
|
Class to represent an instruction operand value |
Classes diagram

Functions
- create_dependency_between_ins(output_ins: Instruction, input_ins: Instruction, context: Context)[source]
- Parameters:
output_ins
input_ins
context
- instruction_factory(ins_type: InstructionType)[source]
Return a instruction of the given instruction type.
- Parameters:
ins_type (
InstructionType) – Instruction type of the new instruction- Returns:
A new instruction instance with the type ins_type
- Return type:
- instruction_from_definition(definition: MicroprobeInstructionDefinition, fix_relative: bool = True)[source]
Return the instruction from a definition.
Given an
MicroprobeInstructionDefinitionobject, return the correspondingInstructionobject.- Parameters:
instr (
MicroprobeInstructionDefinition) – Instruction definition object- Return type:
- instruction_set_def_properties(instr, definition, building_block=None, target=None, allowed_registers=None, fix_relative=True, label_displ=None)[source]
Set instruction properties from an intruction definition.
Set instruction properties according to the properties in the instruction definition. If building_block is provided, its context is used. Otherwise, an empty context is used. The target is the target platform and the allowed_registers parameters spicify which register can be used (written) by the instruction.
- Parameters:
instr (
Instruction) – Instruction instancedefinition (
MicroprobeInstructionDefinition) – Instruction definition instancebuilding_block (
BuildingBlock) – Building block of the instructiontarget (
Target) – Target instanceallowed_registers (
listofRegister) – List of allowed registers
- instruction_to_definition(instr: Instruction)[source]
Return the definition of an instruction.
Given an
Instructionobject, return the correspondingMicroprobeInstructionDefinitionobject.- Parameters:
instr (
Instruction) – Instruction object- Return type: