gem5  v20.1.0.0
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 (PhysRegIdPtr reg)
 Add a physical register to the free list. More...
 
template<class InputIt >
void addRegs (InputIt first, InputIt last)
 Add physical registers to the free list. More...
 
PhysRegIdPtr 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< PhysRegIdPtrfreeRegs
 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 62 of file free_list.hh.

Constructor & Destructor Documentation

◆ SimpleFreeList()

SimpleFreeList::SimpleFreeList ( )
inline

Definition at line 71 of file free_list.hh.

Member Function Documentation

◆ addReg()

void SimpleFreeList::addReg ( PhysRegIdPtr  reg)
inline

◆ addRegs()

template<class InputIt >
void SimpleFreeList::addRegs ( InputIt  first,
InputIt  last 
)
inline

Add physical registers to the free list.

Definition at line 79 of file free_list.hh.

References X86ISA::reg.

Referenced by UnifiedFreeList::addRegs().

◆ getReg()

PhysRegIdPtr SimpleFreeList::getReg ( )
inline

◆ hasFreeRegs()

bool SimpleFreeList::hasFreeRegs ( ) const
inline

◆ numFreeRegs()

unsigned SimpleFreeList::numFreeRegs ( ) const
inline

Member Data Documentation

◆ freeRegs

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

The actual free list.

Definition at line 67 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 Wed Sep 30 2020 14:02:31 for gem5 by doxygen 1.8.17