ETISS 0.11.2
ExtendableTranslatingInstructionSetSimulator(version0.11.2)
Loading...
Searching...
No Matches
Classes | Public Member Functions | Private Attributes | List of all members
etiss::RegisterSet Class Reference

set of register parts. More...

#include <CodePart.h>

Collaboration diagram for etiss::RegisterSet:
Collaboration graph
[legend]

Classes

struct  lex_compare
 special comparison function that only takes register name into account. More...
 

Public Member Functions

 RegisterSet ()
 
 RegisterSet (const RegisterSet &rs)
 
void add (const RegisterPart &rp)
 add a registerPart to the set or just its relevant bits if a register with the same name is already present
 
void add (const std::string &name, unsigned registerWidth, etiss::uintMax bits=(uintMax)((intMax) -1))
 
void applyShadow (const RegisterSet &rs)
 any register bits set in the passed RegisterSet won't be set in this RegisterSet
 
void merge (const RegisterSet &rs)
 any register bits set in the passed RegisterSet will be set in this RegisterSet (plus previously set bits)
 
void intersect (const RegisterSet &rs)
 only register bits set in this AND the passed RegisterSet remain set in this RegisterSet
 
bool disjoint (const RegisterSet &rs) const
 
bool maskedBy (const RegisterSet &rs) const
 
bool isEmpty ()
 
void clear ()
 
std::string _dbg_print () const
 writes a human readable string listing all set bit of every register in this RegisterSet
 

Private Attributes

std::set< RegisterPart, lex_compare > set_
 

Detailed Description

set of register parts.

each register contained in a set has a different name.

Definition at line 162 of file CodePart.h.

Constructor & Destructor Documentation

◆ RegisterSet() [1/2]

etiss::RegisterSet::RegisterSet ( )
inline

Definition at line 178 of file CodePart.h.

◆ RegisterSet() [2/2]

etiss::RegisterSet::RegisterSet ( const RegisterSet &  rs)
inline

Definition at line 179 of file CodePart.h.

References set_.

Member Function Documentation

◆ _dbg_print()

std::string etiss::RegisterSet::_dbg_print ( ) const
inline

writes a human readable string listing all set bit of every register in this RegisterSet

Definition at line 323 of file CodePart.h.

References set_.

◆ add() [1/2]

void etiss::RegisterSet::add ( const RegisterPart &  rp)
inline

add a registerPart to the set or just its relevant bits if a register with the same name is already present

Definition at line 184 of file CodePart.h.

References etiss::RegisterPart::isEmpty(), and set_.

Referenced by add(), RV32IMACFDArch::initInstrSet(), RV64IMACFDArch::initInstrSet(), and merge().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ add() [2/2]

void etiss::RegisterSet::add ( const std::string &  name,
unsigned  registerWidth,
etiss::uintMax  bits = (uintMax)((intMax)-1) 
)
inline
See also
add(const RegisterPart & rp)

Definition at line 205 of file CodePart.h.

References add().

Here is the call graph for this function:

◆ applyShadow()

void etiss::RegisterSet::applyShadow ( const RegisterSet &  rs)
inline

any register bits set in the passed RegisterSet won't be set in this RegisterSet

Definition at line 212 of file CodePart.h.

References set_.

Referenced by etiss::CodeSet::writeCodeParts().

Here is the caller graph for this function:

◆ clear()

void etiss::RegisterSet::clear ( )
inline

Definition at line 319 of file CodePart.h.

References set_.

Referenced by etiss::CodeSet::writeCodeParts().

Here is the caller graph for this function:

◆ disjoint()

bool etiss::RegisterSet::disjoint ( const RegisterSet &  rs) const
inline
Returns
true if no register in this set is in the passed RegisterSet

Definition at line 280 of file CodePart.h.

References set_.

◆ intersect()

void etiss::RegisterSet::intersect ( const RegisterSet &  rs)
inline

only register bits set in this AND the passed RegisterSet remain set in this RegisterSet

Definition at line 253 of file CodePart.h.

References set_.

Referenced by etiss::CodeSet::writeCodeParts().

Here is the caller graph for this function:

◆ isEmpty()

bool etiss::RegisterSet::isEmpty ( )
inline

Definition at line 318 of file CodePart.h.

References set_.

◆ maskedBy()

bool etiss::RegisterSet::maskedBy ( const RegisterSet &  rs) const
inline
Returns
true if any bit set in this RegisterSet is also set in the passed RegisterSet

Definition at line 297 of file CodePart.h.

References set_.

◆ merge()

void etiss::RegisterSet::merge ( const RegisterSet &  rs)
inline

any register bits set in the passed RegisterSet will be set in this RegisterSet (plus previously set bits)

Definition at line 241 of file CodePart.h.

References add(), and set_.

Referenced by etiss::CodeSet::writeCodeParts().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ set_

std::set<RegisterPart, lex_compare> etiss::RegisterSet::set_
private

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