Go to the documentation of this file.
42 #ifndef __CPU_O3_RENAME_MAP_HH__
43 #define __CPU_O3_RENAME_MAP_HH__
49 #include "arch/types.hh"
50 #include "config/the_isa.hh"
54 #include "enums/VecRegRenameMode.hh"
236 assert(
vecMode == Enums::Full);
239 assert(
vecMode == Enums::Elem);
255 panic(
"rename rename(): unknown reg class %s\n",
278 assert(
vecMode == Enums::Full);
282 assert(
vecMode == Enums::Elem);
297 panic(
"rename lookup(): unknown reg class %s\n",
324 assert(
vecMode == Enums::Full);
329 assert(
vecMode == Enums::Elem);
345 assert(phys_reg ==
lookup(arch_reg));
349 panic(
"rename setEntry(): unknown reg class %s\n",
386 canRename(uint32_t intRegs, uint32_t floatRegs, uint32_t vectorRegs,
387 uint32_t vecElemRegs, uint32_t vecPredRegs,
388 uint32_t ccRegs)
const
413 #endif //__CPU_O3_RENAME_MAP_HH__
bool isFloatPhysReg() const
::VecRegT< VecElem, NumVecElemPerVecReg, false > VecReg
unsigned numFreeIntEntries() const
unsigned numFreeVecEntries() const
bool isVectorPhysElem() const
@Return true if it is a vector element physical register.
Unified register rename map for all classes of registers.
SimpleFreeList * freeList
Pointer to the free list from which new physical registers should be allocated in rename()
RenameInfo rename(const RegId &arch_reg)
Tell rename map to get a new free physical register to remap the specified architectural register.
@ VecElemClass
Vector Register Native Elem lane.
const char * className() const
Return a const char* with the register class name.
UnifiedRenameMap()
Default constructor.
SimpleRenameMap intMap
The integer register rename map.
Arch2PhysMap::iterator iterator
void switchFreeList(UnifiedFreeList *freeList)
Switch freeList of registers from Full to Elem or vicevers depending on vecMode (vector renaming mode...
bool isVectorPhysReg() const
@Return true if it is a vector physical register.
PhysRegFile * regFile
The register file object is used only to get PhysRegIdPtr on MiscRegs, as they are stored in it.
~UnifiedRenameMap()
Destructor.
Simple physical register file class.
void switchMode(VecMode newVecMode)
Set vector mode to Full or Elem.
void setEntry(const RegId &arch_reg, PhysRegIdPtr phys_reg)
Update rename map with a specific mapping.
Register ID: describe an architectural register with its class and index.
void init(unsigned size, SimpleFreeList *_freeList, RegIndex _zeroReg)
Because we have an array of rename maps (one per thread) in the CPU, it's awkward to initialize this ...
SimpleRenameMap vecMap
The vector register rename map.
PhysRegIdPtr getMiscRegId(RegIndex reg_idx)
Gets a misc register PhysRegIdPtr.
unsigned numFreeEntries() const
Return the minimum number of free entries across all of the register classes.
@ FloatRegClass
Floating-point register.
const_iterator begin() const
SimpleRenameMap vecElemMap
The vector element register rename map.
iterator end()
Forward end/cend to the map.
PhysRegIdPtr lookup(const RegId &arch_reg) const
Look up the physical register mapped to an architectural register.
void init(PhysRegFile *_regFile, RegIndex _intZeroReg, RegIndex _floatZeroReg, UnifiedFreeList *freeList, VecMode _mode)
Initializes rename map with given parameters.
unsigned numFreeRegs() const
Return the number of free registers on the list.
const_iterator end() const
constexpr unsigned NumVecElemPerVecReg
FreeList class that simply holds the list of free integer and floating point registers.
SimpleRenameMap ccMap
The condition-code register rename map.
SimpleRenameMap::RenameInfo RenameInfo
PhysRegIdPtr lookup(const RegId &arch_reg) const
Look up the physical register mapped to an architectural register.
std::pair< PhysRegIdPtr, PhysRegIdPtr > RenameInfo
Pair of a physical register and a physical register.
bool isCCPhysReg() const
@Return true if it is a condition-code physical register.
SimpleRenameMap floatMap
The floating-point register rename map.
::VecPredRegT< VecElem, NumVecElemPerVecReg, VecPredRegHasPackedRepr, false > VecPredReg
SimpleRenameMap predMap
The predicate register rename map.
unsigned numFreeEntries() const
Return the number of free entries on the associated free list.
bool isIntPhysReg() const
@ IntRegClass
Integer register.
Enums::VecRegRenameMode VecMode
@ CCRegClass
Condition-code register.
unsigned numFreeCCEntries() const
unsigned numFreeFloatEntries() const
@ MiscRegClass
Control (misc) register.
@ VecRegClass
Vector Register.
RenameInfo rename(const RegId &arch_reg)
Tell rename map to get a new free physical register to remap the specified architectural register.
bool canRename(uint32_t intRegs, uint32_t floatRegs, uint32_t vectorRegs, uint32_t vecElemRegs, uint32_t vecPredRegs, uint32_t ccRegs) const
Return whether there are enough registers to serve the request.
void setEntry(const RegId &arch_reg, PhysRegIdPtr phys_reg)
Update rename map with a specific mapping.
TheISA::VecPredReg VecPredReg
Arch2PhysMap map
The acutal arch-to-phys register map.
const_iterator cbegin() const
const_iterator cend() const
unsigned numFreePredEntries() const
RegIndex flatIndex() const
Index flattening.
iterator begin()
Forward begin/cbegin to the map.
bool isVecPredPhysReg() const
Arch2PhysMap::const_iterator const_iterator
const RegClass & classValue() const
Class accessor.
RegId zeroReg
The architectural index of the zero register.
Register rename map for a single class of registers (e.g., integer or floating point).
Free list for a single class of registers (e.g., integer or floating point).
static constexpr uint32_t NVecElems
#define panic(...)
This implements a cprintf based panic() function.
Generated on Wed Sep 30 2020 14:02:09 for gem5 by doxygen 1.8.17