microprobe.target.isa.instruction.GenericInstructionType

class GenericInstructionType(name, mnemonic, opcode, descr, iformat, operands, ioperands, moperands, instruction_checks, target_checks)[source]

Bases: microprobe.target.isa.instruction.InstructionType

Instruction generic class implementation

Parameters:
  • iname (str) – Instruction name
  • idescr (str) – Instruction description
  • iformat (InstructionFormat) – Instruction format
__init__(name, mnemonic, opcode, descr, iformat, operands, ioperands, moperands, instruction_checks, target_checks)[source]
Parameters:
  • name
  • mnemonic
  • opcode
  • descr
  • iformat
  • operands
  • ioperands
  • moperands
  • instruction_checks
  • target_checks

Methods

__init__(name, mnemonic, opcode, descr, …)
param name:
assembly(args[, dissabled_fields]) Returns the assembly representation of this register when when invoked with args list of Operand.
binary(args[, asm_args]) Return the binary representation of this register when when invoked with args list of Operand.
full_report([tabs])
list_properties([tabs])
match(binary) Return a bolean indicating if the binary provided matches the intruction binary mask
register_property(prop[, force])
param prop:
sets(*args) Returns a list of Register instances set by this InstructionType when invoked with args list of Operand.
unregister_property(prop)
param prop:
uses(args) Returns a list of Register instances used by this InstructionType when invoked with args list of Operand.

Attributes

bit_mask
description
format
implicit_operands
instruction_checks
memory_operand_descriptors
mnemonic
name
opcode
operand_descriptors
operands
properties
target_checks



name
mnemonic
description
opcode
operands
memory_operand_descriptors
operand_descriptors
implicit_operands
format
instruction_checks
target_checks
bit_mask
sets(*args)[source]

Returns a list of Register instances set by this InstructionType when invoked with args list of Operand.

Parameters:args (list of Operand instances) – Input operands.
uses(args)[source]

Returns a list of Register instances used by this InstructionType when invoked with args list of Operand.

Parameters:args (list of Operand instances) – Input operands.
assembly(args, dissabled_fields=None)[source]

Returns the assembly representation of this register when when invoked with args list of Operand.

Parameters:
  • args – Input operands.
  • dissable_fields – list of fields that will not be translated into assembly
  • dissabled_fields – (Default value =None)
binary(args, asm_args=None)[source]

Return the binary representation of this register when when invoked with args list of Operand.

Parameters:
  • args – Input operands.
  • asm_args – (Default value = None)
match(binary)[source]

Return a bolean indicating if the binary provided matches the intruction binary mask

Parameters:binary (int) – Binary instruction codification
Return type:bool
full_report(tabs=0)[source]
list_properties(tabs=0)
properties
register_property(prop, force=False)
Parameters:prop
unregister_property(prop)
Parameters:prop