Otawa  0.10
otawa::AbsAddress Class Reference

Subclass of AccessedAddress, this class represents an absolute address access, to a global variable or to an input/output register for example. More...

#include <otawa/stack/AccessedAddress.h>

Inheritance diagram for otawa::AbsAddress:
otawa::AccessedAddress

Public Types

enum  kind_t { ANY, SP, ABS }
 Describe the different implementation of an accessed address. More...
 

Public Member Functions

 AbsAddress (Inst *instruction, bool is_store, const Address &address)
 
const Addressaddress (void) const
 
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...
 
Instinstruction (void) const
 Get the instruction where this memory access applies. More...
 
void print (io::Output &out) const
 Print the given address. More...
 

Private Attributes

Address addr
 

Detailed Description

Subclass of AccessedAddress, this class represents an absolute address access, to a global variable or to an input/output register for example.

Any accessed address of kind AccessedAddress::ABS can be cast in this class.

Member Enumeration Documentation

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.

Constructor & Destructor Documentation

otawa::AbsAddress::AbsAddress ( Inst instruction,
bool  is_store,
const Address address 
)
inline

Member Function Documentation

const Address& otawa::AbsAddress::address ( void  ) const
inline

References addr.

Inst * otawa::AccessedAddress::instruction ( void  ) const
inlineinherited

Get the instruction where this memory access applies.

Returns
Instruction accessing the memory.

References otawa::AccessedAddress::inst.

Referenced by otawa::dcache::BlockBuilder::processBB().

bool otawa::AccessedAddress::isLoad ( void  ) const
inlineinherited

Test if a store is performed on the accessed address.

Returns
True if it is a store.

References otawa::AccessedAddress::store.

bool otawa::AccessedAddress::isStore ( void  ) const
inlineinherited

Test if a store is performed on the accessed address.

Returns
True if it is a store.

References otawa::AccessedAddress::store.

Referenced by otawa::dcache::BlockBuilder::processBB().

AccessedAddress::kind_t otawa::AccessedAddress::kind ( void  ) const
inlineinherited

Get the kind of the address.

According to this kind, this instance may be cast in the corresponding subclass of AccessedAddress.

Returns
Kind of address.

References otawa::AccessedAddress::knd.

Referenced by otawa::dcache::BlockBuilder::processBB().

Member Data Documentation

Address otawa::AbsAddress::addr
private

Referenced by address().


The documentation for this class was generated from the following file: