![]() |
OTAWA
2.0
Framework to perform machine analysis and compute WCET.
|
#include <otawa/hard/Register.h>
Classes | |
class | Make |
Public Types | |
enum | kind_t { NONE = 0, ADDR, INT, FLOAT, BITS } |
typedef enum otawa::hard::Register::kind_t | kind_t |
Public Member Functions | |
const List< string > & | aliases (void) |
RegBank * | bank (void) const |
int | id (void) const |
kind_t | kind (void) const |
const string & | name (void) const |
int | number (void) const |
int | platformNumber (void) const |
Register (const Make &make) | |
Build a register based on a maker class. More... | |
Register (string name, kind_t kind, int size) | |
Build a new register. More... | |
int | size (void) const |
Private Attributes | |
List< string > | _aliases |
RegBank * | _bank |
int | _id |
kind_t | _kind |
string | _name |
int | _number |
int | _size |
Friends | |
class | Platform |
class | RegBank |
Objects of this class are simple machine register, more accurately unbreakable atomic registers.
The preferred way to declare a register is a the user of maker class the provides the most flexiblity:
There is two ways to declare a register bank :
This enumeration represents the differents kind of value found in hardware registers.
otawa::hard::Register::Register | ( | string | name, |
Register::kind_t | kind, | ||
int | size | ||
) |
otawa::hard::Register::Register | ( | const Make & | make | ) |
Build a register based on a maker class.
This allows to define more shorly a register or to provide more detail as alias names.
References _aliases, _kind, _size, otawa::make(), and NONE.
Get the owner bank of the register.
|
inline |
Gives a number which is unique for this platform. Each register, in a platform, is associated with a unique number ranging from 0 to Platform::regCount()-1. This number may be used as index to table or to bit vectors matching the overall registers.
Referenced by otawa::etime::StepGraphBuilder::manageRead(), otawa::etime::StepGraphBuilder::manageWrite(), and otawa::ParExeGraph::newRegResource().
Get the kind of a register.
Referenced by Register().
|
inline |
Get the name of the register.
Referenced by otawa::se::SEReg::asString(), otawa::ParExeGraph::createSequenceResources(), otawa::ParExeGraph::newRegResource(), otawa::hard::operator<<(), otawa::operator<<(), otawa::clp::State::print(), and otawa::clp::State::subsetOf().
|
inline |
Get the register number.
|
inline |
|
inline |
|
friend |
|
friend |
Referenced by Register().
|
private |
Referenced by otawa::hard::RegBank::set().
|
private |
|
private |
Referenced by Register().
|
private |
|
private |
Referenced by otawa::hard::RegBank::set().
|
private |
Referenced by Register().