Otawa
0.10
|
Utility class representing an area in the memory defined by a base address and a size. More...
#include <otawa/base.h>
Public Member Functions | |
MemArea (void) | |
Build a null mem area. More... | |
MemArea (const MemArea &a) | |
MemArea (const Address &base, ot::size size) | |
MemArea (const Address &base, const Address &top) | |
MemArea::MemArea(const MemArea& a); Copy an existing mem area. More... | |
Address | address (void) const |
Get the base address of the area. More... | |
ot::size | size (void) const |
Get the size of the area. More... | |
Address | topAddress (void) const |
Get the top address of the area, that is, the address of the first byte after the area. More... | |
Address | lastAddress (void) const |
Get the last address of the area, that is, the address of the last byte in the area. More... | |
bool | isNull (void) const |
Test if the area is null. More... | |
bool | isEmpty (void) const |
Test whether the area is empty, that is, whether the size is null. More... | |
bool | contains (const Address &addr) const |
Test whether the area contains the given address. More... | |
bool | equals (const MemArea &a) const |
Test wether the current area and the given one are equal. More... | |
bool | includes (const MemArea &a) const |
Test if the current mem area includes (not strictly) the given one. More... | |
bool | meets (const MemArea &a) const |
Test if the current memory area meets at least one byte of the given one. More... | |
MemArea | meet (const MemArea &a) const |
Build the intersection of both memory areas. More... | |
MemArea | join (const MemArea &a) const |
Build a memory area that is the inclusive join of both memory areas. More... | |
void | set (const MemArea &a) |
void | move (const Address &base) |
void | moveTop (const Address &top) |
void | resize (const ot::size size) |
operator bool (void) const | |
bool | operator== (const MemArea &a) const |
bool | operator!= (const MemArea &a) const |
bool | operator>= (const MemArea &a) const |
bool | operator> (const MemArea &a) const |
bool | operator< (const MemArea &a) const |
bool | operator<= (const MemArea &a) const |
MemArea | operator& (const MemArea &a) const |
MemArea | operator+ (const MemArea &a) const |
MemArea | operator= (const MemArea &a) |
void | operator&= (const MemArea &a) |
void | operator+= (const MemArea &a) |
Static Public Attributes | |
static MemArea | null |
Null memory area. More... | |
Private Attributes | |
Address | _base |
ot::size | _size |
Utility class representing an area in the memory defined by a base address and a size.
|
inline |
MemArea::MemArea(const MemArea& a); Copy an existing mem area.
a | Area to copy. MemArea::MemArea(const Address& base, ot::size size); Build a memory area. |
base | Base address of the area. |
size | Size of the area (in bytes). |
Build a memory area.
base | Base address of the area. |
top | Top address, that is, address of the first byte past the area. |
|
inline |
Get the base address of the area.
Referenced by includes(), join(), meet(), meets(), otawa::operator<<(), otawa::FlowFactLoader::scanIgnoreControl(), otawa::FlowFactLoader::scanIgnoreSeq(), otawa::FlowFactLoader::scanMemAccess(), otawa::FlowFactLoader::scanMultiBranch(), otawa::FlowFactLoader::scanMultiCall(), otawa::FlowFactLoader::scanNoInline(), and otawa::FlowFactLoader::scanSetInlining().
|
inline |
Test whether the area contains the given address.
addr | Address to test. |
|
inline |
bool otawa::MemArea::includes | ( | const MemArea & | a | ) | const |
Test if the current mem area includes (not strictly) the given one.
a | Memory area tested for inclusion. |
References address(), and lastAddress().
Referenced by operator<(), and operator<=().
|
inline |
Test whether the area is empty, that is, whether the size is null.
|
inline |
Test if the area is null.
Referenced by otawa::operator<<(), otawa::FlowFactLoader::scanIgnoreControl(), otawa::FlowFactLoader::scanIgnoreSeq(), otawa::FlowFactLoader::scanMultiBranch(), otawa::FlowFactLoader::scanMultiCall(), otawa::FlowFactLoader::scanNoInline(), and otawa::FlowFactLoader::scanSetInlining().
Build a memory area that is the inclusive join of both memory areas.
a | Memory area to join with. |
References address(), lastAddress(), otawa::clp::max(), MemArea(), and otawa::clp::min().
Referenced by otawa::FlowFactLoader::addressOf(), and otawa::FlowFactLoader::scanMemAccess().
|
inline |
Get the last address of the area, that is, the address of the last byte in the area.
Referenced by includes(), join(), meet(), meets(), otawa::FlowFactLoader::scanIgnoreControl(), otawa::FlowFactLoader::scanIgnoreSeq(), otawa::FlowFactLoader::scanMultiBranch(), otawa::FlowFactLoader::scanMultiCall(), otawa::FlowFactLoader::scanNoInline(), and otawa::FlowFactLoader::scanSetInlining().
Build the intersection of both memory areas.
a | Memory area to meet with. |
References address(), lastAddress(), otawa::clp::max(), MemArea(), otawa::clp::min(), and null.
bool otawa::MemArea::meets | ( | const MemArea & | a | ) | const |
Test if the current memory area meets at least one byte of the given one.
a | Memory area to test. |
References address(), and lastAddress().
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
References includes().
|
inline |
References includes().
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Get the size of the area.
|
inline |
Get the top address of the area, that is, the address of the first byte after the area.
Referenced by otawa::operator<<(), and otawa::FlowFactLoader::scanMemAccess().
|
static |
Null memory area.
Referenced by otawa::FlowFactLoader::addressOf(), meet(), and otawa::FlowFactLoader::scanAddress().