gem5  v21.2.1.0
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Public Member Functions | Private Attributes | List of all members
gem5::o3::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 69 of file free_list.hh.

Constructor & Destructor Documentation

◆ SimpleFreeList()

gem5::o3::SimpleFreeList::SimpleFreeList ( )
inline

Definition at line 78 of file free_list.hh.

Member Function Documentation

◆ addReg()

void gem5::o3::SimpleFreeList::addReg ( PhysRegIdPtr  reg)
inline

◆ addRegs()

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

Add physical registers to the free list.

Definition at line 86 of file free_list.hh.

References freeRegs, and gem5::X86ISA::reg.

Referenced by gem5::o3::UnifiedFreeList::addRegs().

◆ getReg()

PhysRegIdPtr gem5::o3::SimpleFreeList::getReg ( )
inline

◆ hasFreeRegs()

bool gem5::o3::SimpleFreeList::hasFreeRegs ( ) const
inline

◆ numFreeRegs()

unsigned gem5::o3::SimpleFreeList::numFreeRegs ( ) const
inline

Member Data Documentation

◆ freeRegs

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

The actual free list.

Definition at line 74 of file free_list.hh.

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


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

Generated on Tue Feb 8 2022 11:49:06 for gem5 by doxygen 1.8.17