gem5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Private Attributes | List of all members
SimpleFreeList Class Reference

Free list for a single class of registers (e.g., integer or floating point). More...

#include <free_list.hh>

Public Member Functions

 SimpleFreeList ()
 
void addReg (PhysRegIndex reg)
 Add a physical register to the free list. More...
 
PhysRegIndex getReg ()
 Get the next available register from the free list. More...
 
unsigned numFreeRegs () const
 Return the number of free registers on the list. More...
 
bool hasFreeRegs () const
 True iff there are free registers on the list. More...
 

Private Attributes

std::queue< PhysRegIndexfreeRegs
 The actual free list. More...
 

Detailed Description

Free list for a single class of registers (e.g., integer or floating point).

Because the register class is implicitly determined by the rename map instance being accessed, all architectural register index parameters and values in this class are relative (e.g., fp2 is just index 2).

Definition at line 51 of file free_list.hh.

Constructor & Destructor Documentation

SimpleFreeList::SimpleFreeList ( )
inline

Definition at line 60 of file free_list.hh.

Member Function Documentation

void SimpleFreeList::addReg ( PhysRegIndex  reg)
inline

Add a physical register to the free list.

Definition at line 63 of file free_list.hh.

References freeRegs.

Referenced by UnifiedFreeList::addCCReg(), UnifiedFreeList::addFloatReg(), UnifiedFreeList::addIntReg(), and UnifiedFreeList::addReg().

PhysRegIndex SimpleFreeList::getReg ( )
inline

Get the next available register from the free list.

Definition at line 66 of file free_list.hh.

References freeRegs.

Referenced by UnifiedFreeList::getCCReg(), UnifiedFreeList::getFloatReg(), UnifiedFreeList::getIntReg(), and SimpleRenameMap::rename().

bool SimpleFreeList::hasFreeRegs ( ) const
inline

True iff there are free registers on the list.

Definition at line 78 of file free_list.hh.

References freeRegs.

Referenced by UnifiedFreeList::hasFreeCCRegs(), UnifiedFreeList::hasFreeFloatRegs(), and UnifiedFreeList::hasFreeIntRegs().

unsigned SimpleFreeList::numFreeRegs ( ) const
inline

Return the number of free registers on the list.

Definition at line 75 of file free_list.hh.

References freeRegs.

Referenced by UnifiedFreeList::numFreeCCRegs(), SimpleRenameMap::numFreeEntries(), UnifiedFreeList::numFreeFloatRegs(), and UnifiedFreeList::numFreeIntRegs().

Member Data Documentation

std::queue<PhysRegIndex> SimpleFreeList::freeRegs
private

The actual free list.

Definition at line 56 of file free_list.hh.

Referenced by addReg(), getReg(), hasFreeRegs(), and numFreeRegs().


The documentation for this class was generated from the following file:

Generated on Fri Jun 9 2017 13:04:19 for gem5 by doxygen 1.8.6