++coding-style
git-svn-id: https://www4.informatik.uni-erlangen.de/i4svn/danceos/trunk/devel/fail@1365 8c4709b5-6ec9-48aa-a5cd-a96041d1645a
This commit is contained in:
@ -16,10 +16,9 @@ namespace fail {
|
||||
*
|
||||
* Lists the different register types. You need to expand this enumeration
|
||||
* to provide more detailed types for your concrete derived register classes
|
||||
* specific to a simulator.
|
||||
* specific to a simulator/architecture.
|
||||
*/
|
||||
enum RegisterType
|
||||
{
|
||||
enum RegisterType {
|
||||
RT_GP, //!< general purpose
|
||||
RT_PC, //!< program counter / instruction pointer
|
||||
RT_ST //!< status register
|
||||
@ -31,9 +30,8 @@ enum RegisterType
|
||||
* Represents the basic generic register class. A set of registers is composed
|
||||
* of classes which had been derived from this class.
|
||||
*/
|
||||
class Register
|
||||
{
|
||||
protected:
|
||||
class Register {
|
||||
protected:
|
||||
RegisterType m_Type; //!< the type of this register
|
||||
regwidth_t m_Width; //!< the register width
|
||||
unsigned int m_Id; //!< the unique id of this register
|
||||
@ -43,7 +41,7 @@ class Register
|
||||
size_t m_Index;
|
||||
std::string m_Name; //!< The (optional) name, maybe empty
|
||||
friend class UniformRegisterSet;
|
||||
public:
|
||||
public:
|
||||
/**
|
||||
* Creates a new register.
|
||||
* @param id the unique id of this register (simulator specific)
|
||||
@ -113,14 +111,13 @@ class Register
|
||||
* enumeration \c RegisterType. (All registers within this set must be of the
|
||||
* same register type.) The capacity of the set is managed automatically.
|
||||
*/
|
||||
class UniformRegisterSet
|
||||
{
|
||||
private:
|
||||
class UniformRegisterSet {
|
||||
private:
|
||||
std::vector< Register* > m_Regs; //!< the unique set of registers
|
||||
RegisterType m_Type; //!< the overall type of this container (set)
|
||||
void m_add(Register* preg);
|
||||
friend class RegisterManager;
|
||||
public:
|
||||
public:
|
||||
/**
|
||||
* The iterator of this class used to loop through the list of
|
||||
* added registers. To retrieve an iterator to the first element, call
|
||||
@ -180,13 +177,12 @@ class UniformRegisterSet
|
||||
* Represents a complete set of (inhomogeneous) registers specific to a concrete
|
||||
* architecture, e.g. x86 or ARM.
|
||||
*/
|
||||
class RegisterManager
|
||||
{
|
||||
protected:
|
||||
class RegisterManager {
|
||||
protected:
|
||||
std::vector< Register* > m_Registers;
|
||||
//!< the managed set of homogeneous sets
|
||||
std::vector< UniformRegisterSet* > m_Subsets;
|
||||
public:
|
||||
public:
|
||||
/**
|
||||
* The iterator of this class used to loop through the list of
|
||||
* added registers. To retrieve an iterator to the first element, call
|
||||
|
||||
Reference in New Issue
Block a user