java.lang.Object | |
↳ | com.pnfsoftware.jeb.core.units.code.asm.processor.arch.AbstractRegisterData |
Known Direct Subclasses |
Common base implementation of a bank of registers.
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
protected Set<Integer> | dirtyRegisters | ||||||||||
protected Map<Integer, byte[]> | values |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
AbstractRegisterData(AbstractRegisterBank layout, Endianness endianness) |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
void | clearAllDirty() | ||||||||||
void | clearDirty(int regnum) | ||||||||||
AbstractRegisterBank |
getBank()
Get the layout used by this register bank.
| ||||||||||
int |
getBitsize(int regnum)
Get the register size in bits.
| ||||||||||
Set<Integer> | getDirtyRegisters() | ||||||||||
Endianness |
getEndianness()
Get the byte ordering used by the registers of this bank.
| ||||||||||
long |
getFlags()
This convenience method returns the value of the general purpose flag.
| ||||||||||
String |
getName(int regnum)
Get the common name of a register.
| ||||||||||
long |
getProgramCounter()
This convenience method returns the value of the program counter register.
| ||||||||||
int | getSize(int regnum) | ||||||||||
byte[] |
getValue(int regnum)
Get the binary value of a register.
| ||||||||||
Long |
getValueAsLong(int regnum)
Get the value of a register that does not exceed 64 bits, as a long, using the bank's set
byte ordering.
| ||||||||||
boolean | isDirty(int regnum) | ||||||||||
void | setAllDirty() | ||||||||||
void | setDirty(int regnum) | ||||||||||
boolean |
setValue(int regnum, byte[] bytes)
Set the binary value of a register.
| ||||||||||
boolean |
setValueAsLong(int regnum, long value)
Set the value of a register, if it does not exceed 64 bits.
| ||||||||||
int |
size()
Retrieve the number of registers defined in the layout used by this register bank.
| ||||||||||
String | toString() |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
From interface
com.pnfsoftware.jeb.core.units.code.asm.processor.IRegisterData
|
Get the layout used by this register bank.
Get the register size in bits. Convenience method.
regnum | register number |
---|
Get the byte ordering used by the registers of this bank.
This convenience method returns the value of the general purpose flag. Which register(s) that value maps to is processor-dependent.
CannotReadRegisterException |
---|
Get the common name of a register. Convenience method.
regnum | register number |
---|
This convenience method returns the value of the program counter register. The value should be interpreted as an unsigned 64-bit integer.
CannotReadRegisterException |
---|
Get the binary value of a register. This method returns null if the value is not available. The bytes are laid out in the target processor byte order.
Note: If the register size is not a multiple of 8, the resulting integer value should be masked to discard the irrelevant upper bits.
regnum | register number |
---|
Get the value of a register that does not exceed 64 bits, as a long, using the bank's set byte ordering.
regnum | register number |
---|
Set the binary value of a register.
regnum | register number |
---|---|
bytes | raw bytes (regardless of byte ordering) |
Set the value of a register, if it does not exceed 64 bits.
regnum | register number |
---|---|
value | register value |
Retrieve the number of registers defined in the layout used by this register bank. Convenience method.