microprobe.target.isa.operand.InstructionAddressRelativeOperand
- class InstructionAddressRelativeOperand(name, descr, maxdispl, mindispl, shift, except_range, relative, step)[source]
Bases:
Operand
Class to represent a relative instruction address operand.
Relative instruction address operands are used for immediates operands used to compute relative distance between the current instruction and the target. Examples are : branch relative, or load address relative.
- __init__(name, descr, maxdispl, mindispl, shift, except_range, relative, step)[source]
Create a InstructionAddressRelativeOperand object.
- Parameters:
name (
str
) – Operand namedescr (
str
) – Operand descriptionmaxdispl (:
int
) – Maximum displacement allowedmindispl (:
int
) – Minimum displacement allowedshift (:
int
) – Number of shifted bitsexcept_range (
list
oftuple()
withint
) – list of forbidden ranges for displacement. Ranges are represented using (lower_bound, upper_bound)
- Return type:
Methods
__init__
(name, descr, maxdispl, mindispl, ...)Create a InstructionAddressRelativeOperand object.
access
(dummy)- param dummy:
check
(value)- param value:
codification
(value)- param value:
copy
()Return a copy of the operand.
random_value
(rand)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
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
).
- random_value(rand: Random)[source]
Return a random possible value for the operand.
- Return type:
:
int
- property shift