com.pnfsoftware.jeb.core.units.code.asm.processor.IInstructionOperandGeneric |
![]() |
This interface is used to represent the most common types of operands: immediate values, registers, direct addresses (absolute or relative), memory access, etc.
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
int | TYPE_ADDR | An absolute address. | |||||||||
int | TYPE_ALIAS | An alias for some value, represented as a String. | |||||||||
int | TYPE_CMA | A complex memory access operand. | |||||||||
int | TYPE_IMM | Immediate value on 64-bit maximum. | |||||||||
int | TYPE_LIST | A list of operands. | |||||||||
int | TYPE_MEMIMM | Memory access via absolute address. | |||||||||
int | TYPE_MEMREG | Memory access via register. | |||||||||
int | TYPE_REG | A register. | |||||||||
int | TYPE_RELADDR | An offset to the instruction address. | |||||||||
int | TYPE_USER_1 | Type to be used for specific user entries. |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
abstract String |
getAlias(long value)
Get the optional alias string to be displayed instead of a given integer value.
| ||||||||||
abstract int |
getOperandType()
Get the operand type.
| ||||||||||
abstract long |
getOperandValue()
Get the value of the operand.
| ||||||||||
abstract long |
getOperandValue(long address)
Get the value of the operand, adjusted (if relevant) for an instruction located at the
provided address.
| ||||||||||
abstract String |
getPrefix(IInstruction insn)
Get the optional prefix to be prepended to the formatted operand.
| ||||||||||
abstract String |
getSuffix(IInstruction insn)
Get the optional suffix prefix to be appended to the formatted operand.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() | |||||||||||
![]() |
An absolute address. Value= the address.
An alias for some value, represented as a String. Implement getAlias(long)
to
display the correct String. Value= TBD.
A complex memory access operand. Child class is specialized, it implements
IInstructionOperandCMA
. Value= N/A.
Immediate value on 64-bit maximum. Value= the value itself.
A list of operands. Child class is specialized, it implements
IInstructionOperandList
. Value= TBD.
Memory access via absolute address. The operand size identifies the size of the accessed data. Value= immediate value that corresponds to the memory access address.
Memory access via register. The operand size identifies the size of the accessed data. Value= register identifier that determines the memory access address.
A register. Value= an opaque register identifier.
An offset to the instruction address. Value= the relative or absolute address, using
getOperandValue(instruction_address)
.
Type to be used for specific user entries. Other types can be declared using
TYPE_USER_1 + n
, with 0 <= n < 0x1000
.
Get the optional alias string to be displayed instead of a given integer value.
Get the operand type. Used to determine how to interpret the results provided by
getOperandBitsize()
and getOperandValue()
.
TYPE_Xxx
constants
Get the value of the operand. The interpretation of the value depends on the operand type and the underlying implementation.
Get the value of the operand, adjusted (if relevant) for an instruction located at the provided address. Example: If the operand is a memory access, this method may return "address + operand value".
Get the optional prefix to be prepended to the formatted operand.
Get the optional suffix prefix to be appended to the formatted operand.