Otawa  0.10
otawa::hard::MeltedBank Class Reference

A melted bank may contains registers with different sizes and kinds. More...

#include <otawa/hard/Register.h>

Inheritance diagram for otawa::hard::MeltedBank:
otawa::hard::RegBank

Public Member Functions

 MeltedBank (elm::CString name,...)
 Build a melted bank with the registers passed in the variable list arguments (ended by null). More...
 
 ~MeltedBank (void)
 
elm::CString name (void) const
 Get the name of the bank. More...
 
Register::kind_t kind (void) const
 Get the kind of registers in the bank. More...
 
int size (void) const
 Get the size, in bits, of the registers in the bank. More...
 
int count (void) const
 Get the count of register in the bank. More...
 
Registerget (int index) const
 Get a register from the bank. More...
 
Registeroperator[] (int index) const
 Short to RegBank::get(). More...
 
const elm::genstruct::Table
< Register * > & 
registers () const
 

Protected Member Functions

void set (int index, Register *reg)
 

Protected Attributes

elm::CString _name
 
Register::kind_t _kind
 
int _size
 
elm::genstruct::AllocatedTable
< Register * > 
_regs
 

Detailed Description

A melted bank may contains registers with different sizes and kinds.

It is useful for grouping state registers.

Constructor & Destructor Documentation

otawa::hard::MeltedBank::MeltedBank ( elm::CString  name,
  ... 
)

Build a melted bank with the registers passed in the variable list arguments (ended by null).

Parameters
nameName of the bank.
...List of registers in the bank.

References otawa::hard::RegBank::_regs, and otawa::hard::RegBank::set().

otawa::hard::MeltedBank::~MeltedBank ( void  )

Member Function Documentation

int otawa::hard::RegBank::count ( void  ) const
inlineinherited

Get the count of register in the bank.

Returns
Bank registers count.

References otawa::hard::RegBank::_regs.

Referenced by otawa::hard::PlainBank::PlainBank(), and otawa::ResourceList::ResourceList().

Register * otawa::hard::RegBank::get ( int  number) const
inlineinherited

Get a register from the bank.

Parameters
numberNumber of the register to get.
Returns
Register matching the given number.

References otawa::hard::RegBank::_regs.

Register::kind_t otawa::hard::RegBank::kind ( void  ) const
inlineinherited

Get the kind of registers in the bank.

Returns
Bank register kind.

References otawa::hard::RegBank::_kind.

Referenced by otawa::hard::PlainBank::PlainBank().

elm::CString otawa::hard::RegBank::name ( void  ) const
inlineinherited

Get the name of the bank.

Returns
Bank name.

References otawa::hard::RegBank::_name.

Referenced by otawa::ResourceList::ResourceList().

Register * otawa::hard::RegBank::operator[] ( int  index) const
inlineinherited

Short to RegBank::get().

const elm::genstruct::Table<Register *>& otawa::hard::RegBank::registers ( ) const
inlineinherited
void otawa::hard::RegBank::set ( int  index,
Register reg 
)
inlineprotectedinherited
int otawa::hard::RegBank::size ( void  ) const
inlineinherited

Get the size, in bits, of the registers in the bank.

Returns
Bank register size.

References otawa::hard::RegBank::_size.

Referenced by otawa::hard::PlainBank::PlainBank().

Member Data Documentation

Register::kind_t otawa::hard::RegBank::_kind
protectedinherited
elm::CString otawa::hard::RegBank::_name
protectedinherited
int otawa::hard::RegBank::_size
protectedinherited

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