microprobe.target.isa.operand.OperandConstReg

class OperandConstReg(name, descr, reg, address_base, address_index, floating_point, vector)[source]

Bases: microprobe.target.isa.operand.Operand

Class to represent a constant register operand.

__init__(name, descr, reg, address_base, address_index, floating_point, vector)[source]
Parameters:
  • name
  • descr
  • reg
  • address_base
  • address_index
  • floating_point
  • vector

Methods

__init__(name, descr, reg, address_base, …)
param name:
access(value)
param value:
check(value) Check if a value is valid for the operand.
codification(value)
param value:
copy()
random_value() Return a random possible value for the operand.
representation(value)
param value:
set_valid_values(values)
param values:
values() Return the possible value of the operand.

Attributes

address_absolute Operand is for generating absolute addresses (bool).
address_base Operand is the base register for an address (bool).
address_immediate Operand is an immediate of an address (bool).
address_index Operand is the index register for an address (bool).
address_relative Operand is for generating relative addresses (bool).
constant Operand is constant (bool).
description Operand description (str).
float Operand is float (bool).
immediate Operand is immediate (bool).
name Operand name (str).
vector Operand is vector (bool).



copy()[source]
values()[source]

Return the possible value of the operand.

Return type:list of Register
random_value()[source]

Return a random possible value for the operand.

Return type:Register
representation(value)[source]
Parameters:value
codification(value)[source]
Parameters:value
access(value)[source]
Parameters:value
set_valid_values(values)[source]
Parameters:values
address_absolute

Operand is for generating absolute addresses (bool).

address_base

Operand is the base register for an address (bool).

address_immediate

Operand is an immediate of an address (bool).

address_index

Operand is the index register for an address (bool).

address_relative

Operand is for generating relative addresses (bool).

check(value)

Check if a value is valid for the operand.

Parameters:value (str, Register or int) – value of the operand.
Raises:microprobe.exceptions.MicroprobeValueError – if the value is not allowed for the operand
constant

Operand is constant (bool).

description

Operand description (str).

float

Operand is float (bool).

immediate

Operand is immediate (bool).

name

Operand name (str).

vector

Operand is vector (bool).