gem5  v22.0.0.2
Public Member Functions | Public Attributes | Private Attributes | List of all members
gem5::RegFile Class Reference

#include <regfile.hh>

Public Member Functions

 RegFile (const RegClass &info, const size_t new_size)
 
 RegFile (const RegClass &info)
 
size_t size () const
 
size_t regShift () const
 
size_t regBytes () const
 
template<typename Reg = RegVal>
Regreg (size_t idx)
 
template<typename Reg = RegVal>
const Regreg (size_t idx) const
 
void * ptr (size_t idx)
 
const void * ptr (size_t idx) const
 
void get (size_t idx, void *val) const
 
void set (size_t idx, const void *val)
 
void clear ()
 

Public Attributes

const RegClassregClass
 

Private Attributes

std::vector< uint8_t > data
 
const size_t _size
 
const size_t _regShift
 
const size_t _regBytes
 

Detailed Description

Definition at line 41 of file regfile.hh.

Constructor & Destructor Documentation

◆ RegFile() [1/2]

gem5::RegFile::RegFile ( const RegClass info,
const size_t  new_size 
)
inline

Definition at line 52 of file regfile.hh.

◆ RegFile() [2/2]

gem5::RegFile::RegFile ( const RegClass info)
inline

Definition at line 58 of file regfile.hh.

Member Function Documentation

◆ clear()

void gem5::RegFile::clear ( )
inline

Definition at line 104 of file regfile.hh.

References data, and gem5::MipsISA::fill.

◆ get()

void gem5::RegFile::get ( size_t  idx,
void *  val 
) const
inline

Definition at line 93 of file regfile.hh.

References _regBytes, ptr(), and gem5::X86ISA::val.

Referenced by gem5::o3::PhysRegFile::getReg().

◆ ptr() [1/2]

void* gem5::RegFile::ptr ( size_t  idx)
inline

Definition at line 81 of file regfile.hh.

References _regShift, and data.

Referenced by get(), gem5::o3::PhysRegFile::getWritableReg(), and set().

◆ ptr() [2/2]

const void* gem5::RegFile::ptr ( size_t  idx) const
inline

Definition at line 87 of file regfile.hh.

References _regShift, and data.

◆ reg() [1/2]

template<typename Reg = RegVal>
Reg& gem5::RegFile::reg ( size_t  idx)
inline

Definition at line 66 of file regfile.hh.

References _regBytes, _regShift, _size, and data.

Referenced by gem5::o3::PhysRegFile::getReg(), and gem5::o3::PhysRegFile::setReg().

◆ reg() [2/2]

template<typename Reg = RegVal>
const Reg& gem5::RegFile::reg ( size_t  idx) const
inline

Definition at line 73 of file regfile.hh.

References _regBytes, _regShift, _size, and data.

◆ regBytes()

size_t gem5::RegFile::regBytes ( ) const
inline

Definition at line 62 of file regfile.hh.

References _regBytes.

◆ regShift()

size_t gem5::RegFile::regShift ( ) const
inline

Definition at line 61 of file regfile.hh.

References _regShift.

◆ set()

void gem5::RegFile::set ( size_t  idx,
const void *  val 
)
inline

Definition at line 99 of file regfile.hh.

References _regBytes, ptr(), and gem5::X86ISA::val.

Referenced by gem5::o3::PhysRegFile::setReg().

◆ size()

size_t gem5::RegFile::size ( ) const
inline

Definition at line 60 of file regfile.hh.

References _size.

Member Data Documentation

◆ _regBytes

const size_t gem5::RegFile::_regBytes
private

Definition at line 47 of file regfile.hh.

Referenced by get(), reg(), regBytes(), and set().

◆ _regShift

const size_t gem5::RegFile::_regShift
private

Definition at line 46 of file regfile.hh.

Referenced by ptr(), reg(), and regShift().

◆ _size

const size_t gem5::RegFile::_size
private

Definition at line 45 of file regfile.hh.

Referenced by reg(), and size().

◆ data

std::vector<uint8_t> gem5::RegFile::data
private

Definition at line 44 of file regfile.hh.

Referenced by clear(), ptr(), and reg().

◆ regClass

const RegClass& gem5::RegFile::regClass

Definition at line 50 of file regfile.hh.

Referenced by gem5::o3::PhysRegFile::getReg(), and gem5::o3::PhysRegFile::setReg().


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

Generated on Thu Jul 28 2022 13:33:11 for gem5 by doxygen 1.8.17