microprobe.code.ins.InstructionOperandValue

class InstructionOperandValue(operand_descriptor: OperandDescriptor)[source]

Bases: Pickable

Class to represent an instruction operand value

__init__(operand_descriptor: OperandDescriptor)[source]
Parameters:

operand_descriptor

Methods

__init__(operand_descriptor)

param operand_descriptor:

copy()

Return a copy of the instruction operand value.

register_operand_callbacks(set_function, ...)

param set_function:

set_descriptor(descriptor)

param descriptor:

set_type(new_type)

param new_type:

set_value(value[, check])

param value:

sets()

Return the list of registers set by the operand.

unset_value()

Unsets the operand value.

uses()

Return the list of registers used by the operand.

Attributes

descriptor

Descriptor of the operand (OperandDescriptor)

is_input

Is input flag (bool)

is_output

Is output flag (bool)

representation

Representation of the operand value for generating assembly.

type

Type of the operand descriptor (Operand)

value

Value of the instruction operand.




property value

Value of the instruction operand. (type depends on the operand)

property descriptor

Descriptor of the operand (OperandDescriptor)

copy()[source]

Return a copy of the instruction operand value.

Return type:

InstructionOperandValue

set_descriptor(descriptor: OperandDescriptor)[source]
Parameters:

descriptor

set_value(value, check: bool = True)[source]
Parameters:
  • value

  • check – (Default value = True)

unset_value()[source]

Unsets the operand value.

sets()[source]

Return the list of registers set by the operand.

Return type:

list of Register

property representation

Representation of the operand value for generating assembly.

uses()[source]

Return the list of registers used by the operand.

Return type:

list of Register

property type

Type of the operand descriptor (Operand)

property is_input

Is input flag (bool)

property is_output

Is output flag (bool)

set_type(new_type)[source]
Parameters:

new_type

register_operand_callbacks(set_function, unset_function: Callable[[], None] | None)[source]
Parameters:
  • set_function

  • unset_function