ETISS 0.8.0
Extendable Translating Instruction Set Simulator (version 0.8.0)
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 More...
 
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 More...
 
void merge (const RegisterSet &rs)
 any register bits set in the passed RegisterSet will be set in this RegisterSet (plus previously set bits) More...
 
void intersect (const RegisterSet &rs)
 only register bits set in this AND the passed RegisterSet remain set in this RegisterSet More...
 
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 More...
 

Private Attributes

std::set< RegisterPart, lex_compareset_
 

Detailed Description

set of register parts.

each register contained in a set has a different name.

Definition at line 200 of file CodePart.h.

Constructor & Destructor Documentation

◆ RegisterSet() [1/2]

etiss::RegisterSet::RegisterSet ( )
inline

Definition at line 216 of file CodePart.h.

◆ RegisterSet() [2/2]

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

Definition at line 217 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 361 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 222 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 243 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 250 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 357 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 318 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 291 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 356 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 335 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 279 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: