gem5 v24.0.0.0
Loading...
Searching...
No Matches
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.

◆ 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(), reg(), regBytes(), and set().

◆ _regShift

const size_t gem5::RegFile::_regShift
private

Definition at line 46 of file regfile.hh.

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

◆ _size

const size_t gem5::RegFile::_size
private

Definition at line 45 of file regfile.hh.

Referenced by reg(), reg(), and size().

◆ data

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

Definition at line 44 of file regfile.hh.

Referenced by clear(), ptr(), ptr(), reg(), 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 Tue Jun 18 2024 16:24:13 for gem5 by doxygen 1.11.0