36 #include "debug/Rename.hh"
43 : freeList(NULL), zeroReg(0)
74 map[arch_reg] = renamed_reg;
81 DPRINTF(Rename,
"Renamed reg %d to physical reg %d old mapping was %d\n",
82 arch_reg, renamed_reg, prev_reg);
125 panic(
"rename rename(): unknown reg class %s\n",
150 panic(
"rename lookup(): unknown reg class %s\n",
179 panic(
"rename setEntry(): unknown reg class %s\n",
PhysRegIndex lookup(RegIndex arch_reg) const
Look up the physical register mapped to an architectural register.
SimpleFreeList floatList
The list of free floating point registers.
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.
SimpleFreeList intList
The list of free integer registers.
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...
PhysRegIndex getReg()
Get the next available register from the free list.
RegIndex zeroReg
The architectural index of the zero register.
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. ...
SimpleRenameMap intMap
The integer register rename map.
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...
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.
SimpleFreeList ccList
The list of free condition-code registers.
const char * RegClassStrings[]
Map enum values to strings for debugging.
std::pair< PhysRegIndex, PhysRegIndex > RenameInfo
Pair of a physical register and a physical register.
void setFloatEntry(RegIndex arch_reg, PhysRegIndex phys_reg)
Perform setEntry() on a floating-point register, given a relative floating-point register index...
RegClass regIdxToClass(TheISA::RegIndex reg_idx, TheISA::RegIndex *rel_reg_idx=NULL)
Map a 'unified' architectural register index to its register class.
void init(PhysRegFile *_regFile, RegIndex _intZeroReg, RegIndex _floatZeroReg, UnifiedFreeList *freeList)
Initializes rename map with given parameters.