java.lang.Object | |
↳ | com.pnfsoftware.jeb.core.units.code.asm.type.StorageEntry |
Representation of an immutable storage entry (input/output) for sub-routine calls. Used to define
ICallingConvention
objects.
Types of storage entries:
Nested Classes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
enum | StorageEntry.TransformationRule | Transformation rules for multi-slot storages. | |||||||||
enum | StorageEntry.Type | Type of storage requirements (on the stack, in registers, etc.). |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
void | collectRegisters(Set<Long> sink) | ||||||||||
static StorageEntry |
createMixed(StorageEntry... items)
Create a mixed storage entry.
| ||||||||||
static StorageEntry |
createMixed(Collection<StorageEntry> items)
Create a mixed storage entry.
| ||||||||||
static StorageEntry |
createRegister(long regId)
Create a single-register storage entry.
| ||||||||||
static StorageEntry |
createRegisterPair(long regId1, long regId2)
Create a double-register storage entry.
| ||||||||||
static StorageEntry |
createRegisterPairEndianDep(long regId1, long regId2)
Create a double-register storage entry.
| ||||||||||
static StorageEntry | createRegisterQuad(long regId1, long regId2, long regId3, long regId4) | ||||||||||
static StorageEntry | createRegisterQuadEndianDep(long regId1, long regId2, long regId3, long regId4) | ||||||||||
static StorageEntry |
createStackEntry(long slotIndex, int slotCount)
Create a stack storage entry.
| ||||||||||
static StorageEntry |
createStackSlot(long slotIndex)
Create a single-slot stack storage entry.
| ||||||||||
boolean | equals(Object obj) | ||||||||||
String | formatLong(IRegisterBank rbl) | ||||||||||
String | formatParseable(IRegisterBank rbl) | ||||||||||
StorageEntry | getMixedItem(int index) | ||||||||||
List<StorageEntry> | getMixedItems() | ||||||||||
Collection<Long> | getRegisters() | ||||||||||
int | getSlotCount() | ||||||||||
StorageEntry.Type | getType() | ||||||||||
long |
getValue()
Get the slot index or native register id, depending on the type of this object.
| ||||||||||
long |
getValue(Endianness endian)
Get the slot index or native register id, depending on the type of this object.
| ||||||||||
long |
getValue2()
For register pairs, retrieve the native register id of the second register of the pair.
| ||||||||||
long |
getValue2(Endianness endian)
For register pairs, retrieve the native register id of the second register of the pair.
| ||||||||||
long |
getValue3()
For register quads, retrieve the native register id of the third register.
| ||||||||||
long |
getValue4()
For register quads, retrieve the native register id of the fourth register.
| ||||||||||
int | getValueAsStackIndex() | ||||||||||
int | hashCode() | ||||||||||
boolean | isRegisterBased() | ||||||||||
boolean | isStackBased() | ||||||||||
int |
nextSlotIndex(int currentSlotIndex, int requestedSlotCount)
Calculate the next slot index given the slot index of the current storage entry.
| ||||||||||
StorageEntry | nextStackEntry(int slotcount, int slotalign) | ||||||||||
StorageEntry | nextStackEntry(int slotcount) | ||||||||||
String | toString() | ||||||||||
StorageEntry |
withCount(int count)
Duplicate this STACK entry, and set a custom slot count.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
Create a single-register storage entry.
regId | register id (refer to register banks) |
---|
Create a double-register storage entry.
regId1 | low register id (refer to register banks) |
---|---|
regId2 | high register id (refer to register banks) |
Create a double-register storage entry. Register order (which one stores the LSB, which one stores the MSB) depends on external parameters.
regId1 | first register id (refer to register banks) |
---|---|
regId2 | second register id (refer to register banks) |
Create a stack storage entry. Stack entries are relative to the stack pointer at the called routine entry-point.
Create a single-slot stack storage entry. Stack entries are relative to the stack pointer at the called routine entry-point.
Get the slot index or native register id, depending on the type of this object.
Get the slot index or native register id, depending on the type of this object. To be used
for REGISTER_PAIR
over getValue()
which may return the wrong slot
index.
For register pairs, retrieve the native register id of the second register of the pair.
For register pairs, retrieve the native register id of the second register of the pair.
For register quads, retrieve the native register id of the third register.
For register quads, retrieve the native register id of the fourth register.
Calculate the next slot index given the slot index of the current storage entry.
currentSlotIndex | slot index of this storage entry |
---|---|
requestedSlotCount | the amount of slots used to accommodate this entry, unless it was a register-based entry |