Otawa  0.10
otawa::hard::PlainBank Class Reference

A plain bank is a register bank whose registers have the same size and the same type. More...

#include <otawa/hard/Register.h>

Inheritance diagram for otawa::hard::PlainBank:
otawa::hard::RegBank

Public Member Functions

 PlainBank (elm::CString name, Register::kind_t kind, int size, elm::CString pattern, int count)
 Buila new plain bank. More...
 
 ~PlainBank (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 plain bank is a register bank whose registers have the same size and the same type.

It represents the usual integer or floating-point banks.

Constructor & Destructor Documentation

otawa::hard::PlainBank::PlainBank ( elm::CString  name,
Register::kind_t  kind,
int  size,
elm::CString  pattern,
int  count 
)

Buila new plain bank.

Parameters
nameName of the bank.
kindKind of registers in the bank.
sizeSize in bits of registers in the bank.
patternPattern for naming registers in the bank : d for decimal numbering, a for lower-case alphabetic numbering, A for upper-case alphabetic numbering.
countCount of registers.

References otawa::hard::RegBank::count(), otawa::hard::RegBank::kind(), otawa::hard::RegBank::Register, otawa::hard::RegBank::set(), and otawa::hard::RegBank::size().

otawa::hard::PlainBank::~PlainBank ( 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 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 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 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: