Otawa
0.10
|
Parent class of classes representing accesses to memory. More...
#include <otawa/stack/AccessedAddress.h>
Public Types | |
enum | kind_t { ANY, SP, ABS } |
Describe the different implementation of an accessed address. More... | |
Public Member Functions | |
AccessedAddress (Inst *instruction, bool is_store, kind_t kind=ANY) | |
kind_t | kind (void) const |
Get the kind of the address. More... | |
bool | isStore (void) const |
Test if a store is performed on the accessed address. More... | |
bool | isLoad (void) const |
Test if a store is performed on the accessed address. More... | |
Inst * | instruction (void) const |
Get the instruction where this memory access applies. More... | |
void | print (io::Output &out) const |
Print the given address. More... | |
Private Attributes | |
Inst * | inst |
unsigned char | store |
unsigned char | knd |
Parent class of classes representing accesses to memory.
Describe the different implementation of an accessed address.
Enumerator | |
---|---|
ANY |
Represents the most imprecise memory access: it may potentially concern the full memory address space. |
SP |
Represents an stack pointer relative address with a constant offset. Instances of this kind can be casted into SPAddress. |
ABS |
Represents an address defined by its absolute and constant value. Instances of this kind can be casted into AbsAddress. |
|
inline |
|
inline |
Get the instruction where this memory access applies.
References inst.
Referenced by otawa::dcache::BlockBuilder::processBB().
|
inline |
Test if a store is performed on the accessed address.
References store.
|
inline |
Test if a store is performed on the accessed address.
References store.
Referenced by otawa::dcache::BlockBuilder::processBB().
|
inline |
Get the kind of the address.
According to this kind, this instance may be cast in the corresponding subclass of AccessedAddress.
References knd.
Referenced by otawa::dcache::BlockBuilder::processBB().
void otawa::AccessedAddress::print | ( | io::Output & | out | ) | const |
Print the given address.
out | Output stream. |
References elm::abs(), ABS, otawa::ProgItem::address(), otawa::ot::address(), ANY, hex(), inst, knd, otawa::SPAddress::offset(), otawa::sign(), SP, and store.
Referenced by otawa::operator<<().
|
private |
Referenced by instruction(), and print().