49 #ifndef __CPU_O3_RENAME_MAP_HH__
50 #define __CPU_O3_RENAME_MAP_HH__
56 #include "arch/types.hh"
57 #include "config/the_isa.hh"
132 assert(arch_reg <
map.size());
133 return map[arch_reg];
144 map[arch_reg] = phys_reg;
365 bool canRename(uint32_t intRegs, uint32_t floatRegs, uint32_t ccRegs)
const
374 #endif //__CPU_O3_RENAME_MAP_HH__
PhysRegIndex lookup(RegIndex arch_reg) const
Look up the physical register mapped to an architectural register.
unsigned numFreeEntries() const
Return the minimum number of free entries across all of the register classes.
unsigned numFreeEntries() const
Return the number of free entries on the associated free list.
RenameInfo rename(RegIndex arch_reg)
Tell rename map to get a new free physical register to remap the specified architectural register...
Simple physical register file class.
RenameInfo renameFloat(RegIndex rel_arch_reg)
Perform rename() on a floating-point register, given a relative floating-point register index...
void setEntry(RegIndex arch_reg, PhysRegIndex phys_reg)
Update rename map with a specific mapping.
SimpleRenameMap ccMap
The condition-code register rename map.
void setIntEntry(RegIndex arch_reg, PhysRegIndex phys_reg)
Perform setEntry() on an integer register, given a relative integer register index.
SimpleRenameMap floatMap
The floating-point register rename map.
RenameInfo renameInt(RegIndex rel_arch_reg)
Perform rename() on an integer register, given a relative integer register index. ...
RenameInfo renameCC(RegIndex rel_arch_reg)
Perform rename() on a condition-code register, given a relative condition-code register index...
RegIndex zeroReg
The architectural index of the zero register.
unsigned numFreeRegs() const
Return the number of free registers on the list.
std::vector< PhysRegIndex > map
The acutal arch-to-phys register map.
Free list for a single class of registers (e.g., integer or floating point).
RenameInfo renameMisc(RegIndex rel_arch_reg)
Perform rename() on a misc register, given a relative misc register index.
TheISA::RegIndex RegIndex
PhysRegIndex lookupMisc(RegIndex rel_arch_reg) const
Perform lookup() on a misc register, given a relative misc register index.
PhysRegIndex lookupFloat(RegIndex rel_arch_reg) const
Perform lookup() on a floating-point register, given a relative floating-point register index...
void setCCEntry(RegIndex arch_reg, PhysRegIndex phys_reg)
Perform setEntry() on a condition-code register, given a relative condition-code register index...
PhysRegIndex lookupInt(RegIndex rel_arch_reg) const
Perform lookup() on an integer register, given a relative integer register index. ...
UnifiedRenameMap()
Default constructor.
bool canRename(uint32_t intRegs, uint32_t floatRegs, uint32_t ccRegs) const
Return whether there are enough registers to serve the request.
SimpleRenameMap intMap
The integer register rename map.
Unified register rename map for all classes of registers.
PhysRegIndex lookupCC(RegIndex rel_arch_reg) const
Perform lookup() on a condition-code register, given a relative condition-code register index...
PhysRegFile * regFile
The register file object is used only to distinguish integer from floating-point physical register in...
SimpleFreeList * freeList
Pointer to the free list from which new physical registers should be allocated in rename() ...
RenameInfo rename(RegIndex arch_reg)
Tell rename map to get a new free physical register to remap the specified architectural register...
bool isIntPhysReg(PhysRegIndex reg_idx) const
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 ...
TheISA::RegIndex RegIndex
FreeList class that simply holds the list of free integer and floating point registers.
~UnifiedRenameMap()
Destructor.
void setEntry(RegIndex arch_reg, PhysRegIndex phys_reg)
Update rename map with a specific mapping.
std::pair< PhysRegIndex, PhysRegIndex > RenameInfo
Pair of a physical register and a physical register.
unsigned totalNumPhysRegs() const
bool isFloatPhysReg(PhysRegIndex reg_idx) const
PhysRegIndex lookup(RegIndex arch_reg) const
Look up the physical register mapped to an architectural register.
void setFloatEntry(RegIndex arch_reg, PhysRegIndex phys_reg)
Perform setEntry() on a floating-point register, given a relative floating-point register index...
bool isCCPhysReg(PhysRegIndex reg_idx)
Return true if the specified physical register index corresponds to a condition-code physical registe...
SimpleRenameMap::RenameInfo RenameInfo
void init(PhysRegFile *_regFile, RegIndex _intZeroReg, RegIndex _floatZeroReg, UnifiedFreeList *freeList)
Initializes rename map with given parameters.
Register rename map for a single class of registers (e.g., integer or floating point).