microprobe.code.ins

microprobe.code.ins module

Functions

create_dependency_between_ins(output_ins, …)
param output_ins:
 
instruction_factory(ins_type) Return a instruction of the given instruction type.
instruction_from_definition(definition[, …]) Return the instruction from a definition.
instruction_set_def_properties(instr, definition) Set instruction properties from an intruction definition.
instruction_to_definition(instr) Return the definition of an instruction.
instructions_from_asm(asm, target[, labels, …])
param asm:

Classes

Instruction() Class to represent an instruction
InstructionMemoryOperandValue(…) Class to represent an instruction operand value
InstructionOperandValue(operand_descriptor) Class to represent an instruction operand value
MicroprobeInstructionDefinition(…)

Classes diagram

Inheritance diagram of Instruction, InstructionMemoryOperandValue, InstructionOperandValue, MicroprobeInstructionDefinition


Functions

create_dependency_between_ins(output_ins, input_ins, context)[source]
Parameters:
  • output_ins
  • input_ins
  • context
instruction_factory(ins_type)[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
instruction_from_definition(definition, fix_relative=True)[source]

Return the instruction from a definition.

Given an MicroprobeInstructionDefinition object, return the corresponding Instruction object.

Parameters:instr (MicroprobeInstructionDefinition) – Instruction definition object
Return type:Instruction
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:
instruction_to_definition(instr)[source]

Return the definition of an instruction.

Given an Instruction object, return the corresponding MicroprobeInstructionDefinition object.

Parameters:instr (Instruction) – Instruction object
Return type:MicroprobeInstructionDefinition
instructions_from_asm(asm, target, labels=None, fix_relative=True)[source]
Parameters:
  • asm
  • target
  • labels