microprobe.target.isa.operand.OperandConstReg
- class OperandConstReg(name, descr, reg, address_base, address_index, floating_point, vector)[source]
Bases:
OperandClass 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, ...)access(value)check(value)Check if a value is valid for the operand.
codification(value)copy()Return a copy of the operand.
random_value(rand)Return a random possible value for the operand.
representation(value)set_valid_values(values)values()Return the possible value of the operand.
Attributes
Operand is for generating absolute addresses (
bool).Operand is the base register for an address (
bool).Operand is an immediate of an address (
bool).Operand is the index register for an address (
bool).Operand is for generating relative addresses (
bool).Operand is constant (
bool).Operand description (
str).Operand is float (
bool).Operand is immediate (
bool).Operand name (
str).Operand is vector (
bool).
- check(value)
Check if a value is valid for the operand.
- Parameters:
- Raises:
microprobe.exceptions.MicroprobeValueError – if the value is not allowed for the operand