53 unsigned _numPhysicalFloatRegs,
54 unsigned _numPhysicalVecRegs,
55 unsigned _numPhysicalVecPredRegs,
56 unsigned _numPhysicalCCRegs,
58 : intRegFile(*reg_classes.
at(
IntRegClass), _numPhysicalIntRegs),
60 vectorRegFile(*reg_classes.
at(
VecRegClass), _numPhysicalVecRegs),
61 vectorElemRegFile(*reg_classes.
at(
VecElemClass), _numPhysicalVecRegs * (
65 _numPhysicalVecPredRegs),
66 ccRegFile(*reg_classes.
at(
CCRegClass), _numPhysicalCCRegs),
67 numPhysicalIntRegs(_numPhysicalIntRegs),
68 numPhysicalFloatRegs(_numPhysicalFloatRegs),
69 numPhysicalVecRegs(_numPhysicalVecRegs),
70 numPhysicalVecElemRegs(_numPhysicalVecRegs * (
73 numPhysicalVecPredRegs(_numPhysicalVecPredRegs),
74 numPhysicalCCRegs(_numPhysicalCCRegs),
75 totalNumRegs(_numPhysicalIntRegs
76 + _numPhysicalFloatRegs
78 + numPhysicalVecElemRegs
79 + _numPhysicalVecPredRegs
88 phys_reg, flat_reg_idx++);
95 phys_reg, flat_reg_idx++);
126 for (phys_reg = 0; phys_reg < reg_classes.at(
MiscRegClass)->numRegs();
198 panic(
"Tried to get register IDs for the invalid class.");
201 return std::make_pair(PhysIds::iterator(),
202 PhysIds::iterator());
208 switch (
reg->classValue()) {
215 "Trying to get the register of a %s register",
reg->className());
std::vector< PhysRegId > vecElemIds
std::vector< PhysRegId > ccRegIds
std::vector< PhysRegId > miscRegIds
Misc Reg Ids.
unsigned numPhysicalVecRegs
Number of physical vector registers.
unsigned numPhysicalCCRegs
Number of physical CC registers.
unsigned numPhysicalVecPredRegs
Number of physical predicate registers.
std::vector< PhysRegId > floatRegIds
std::vector< PhysRegId > vecRegIds
IdRange getRegIds(RegClassType cls)
Get the PhysRegIds of the elems of all vector registers.
PhysRegFile(unsigned _numPhysicalIntRegs, unsigned _numPhysicalFloatRegs, unsigned _numPhysicalVecRegs, unsigned _numPhysicalVecPredRegs, unsigned _numPhysicalCCRegs, const BaseISA::RegClasses &classes)
Constructs a physical register file with the specified amount of integer and floating point registers...
unsigned numPhysicalVecElemRegs
Number of physical vector element registers.
unsigned numPhysicalFloatRegs
Number of physical floating point registers.
std::vector< PhysRegId > intRegIds
std::vector< PhysRegId > vecPredRegIds
unsigned numPhysicalIntRegs
Number of physical general purpose registers.
PhysRegIdPtr getTrueId(PhysRegIdPtr reg)
Get the true physical register id.
void initFreeList(UnifiedFreeList *freeList)
Initialize the free list.
FreeList class that simply holds the list of free integer and floating point registers.
void addRegs(InputIt first, InputIt last)
Adds a register back to the free list.
#define panic(...)
This implements a cprintf based panic() function.
#define panic_if(cond,...)
Conditional panic macro that checks the supplied condition and only panics if the condition is true a...
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
RegClassType
Enumerate the classes of registers.
@ FloatRegClass
Floating-point register.
@ CCRegClass
Condition-code register.
@ VecRegClass
Vector Register.
@ IntRegClass
Integer register.
@ MiscRegClass
Control (misc) register.
@ VecElemClass
Vector Register Native Elem lane.