gem5 v24.0.0.0
Loading...
Searching...
No Matches
gem5::RegClass Class Reference

#include <reg_class.hh>

Public Types

using iterator = RegClassIterator
 

Public Member Functions

constexpr RegClass (RegClassType type, const char *new_name, size_t num_regs, const debug::Flag &debug_flag)
 
constexpr RegClass needsFlattening () const
 
constexpr RegClass ops (const RegClassOps &new_ops) const
 
template<class RegType >
constexpr RegClass regType () const
 
constexpr RegClassType type () const
 
constexpr const char * name () const
 
constexpr size_t numRegs () const
 
constexpr size_t regBytes () const
 
constexpr size_t regShift () const
 
constexpr const debug::Flagdebug () const
 
constexpr bool isFlat () const
 
std::string regName (const RegId &id) const
 
std::string valString (const void *val) const
 
std::string valString (const void *val, const uint64_t &num_bytes) const
 
RegId flatten (const BaseISA &isa, const RegId &id) const
 
iterator begin () const
 
iterator end () const
 
constexpr RegId operator[] (RegIndex idx) const
 

Private Attributes

RegClassType _type
 
const char * _name
 
size_t _numRegs
 
size_t _regBytes = sizeof(RegVal)
 
size_t _regShift = ceilLog2(sizeof(RegVal))
 
const RegClassOps_ops = &defaultOps
 
const debug::FlagdebugFlag
 
bool _flat = true
 

Static Private Attributes

static RegClassOps defaultOps
 

Detailed Description

Definition at line 185 of file reg_class.hh.

Member Typedef Documentation

◆ iterator

Definition at line 261 of file reg_class.hh.

Constructor & Destructor Documentation

◆ RegClass()

gem5::RegClass::RegClass ( RegClassType type,
const char * new_name,
size_t num_regs,
const debug::Flag & debug_flag )
inlineconstexpr

Definition at line 205 of file reg_class.hh.

Member Function Documentation

◆ begin()

RegClassIterator gem5::RegClass::begin ( ) const
inline

Definition at line 346 of file reg_class.hh.

◆ debug()

const debug::Flag & gem5::RegClass::debug ( ) const
inlineconstexpr

Definition at line 241 of file reg_class.hh.

References debugFlag.

◆ end()

RegClassIterator gem5::RegClass::end ( ) const
inline

Definition at line 352 of file reg_class.hh.

References numRegs().

◆ flatten()

RegId gem5::RegClass::flatten ( const BaseISA & isa,
const RegId & id ) const
inline

Definition at line 256 of file reg_class.hh.

References _ops, gem5::RegClassOps::flatten(), gem5::ArmISA::id, and isFlat().

Referenced by gem5::RegId::flatten().

◆ isFlat()

bool gem5::RegClass::isFlat ( ) const
inlineconstexpr

Definition at line 242 of file reg_class.hh.

References _flat.

Referenced by flatten(), and gem5::RegId::isFlat().

◆ name()

const char * gem5::RegClass::name ( ) const
inlineconstexpr

Definition at line 237 of file reg_class.hh.

References _name.

Referenced by gem5::RegId::className().

◆ needsFlattening()

RegClass gem5::RegClass::needsFlattening ( ) const
inlineconstexpr

Definition at line 211 of file reg_class.hh.

References _flat.

◆ numRegs()

size_t gem5::RegClass::numRegs ( ) const
inlineconstexpr

Definition at line 238 of file reg_class.hh.

References _numRegs.

Referenced by end(), and gem5::o3::SimpleRenameMap::init().

◆ operator[]()

RegId gem5::RegClass::operator[] ( RegIndex idx) const
inlineconstexpr

Definition at line 358 of file reg_class.hh.

◆ ops()

RegClass gem5::RegClass::ops ( const RegClassOps & new_ops) const
inlineconstexpr

Definition at line 219 of file reg_class.hh.

References _ops.

◆ regBytes()

size_t gem5::RegClass::regBytes ( ) const
inlineconstexpr

◆ regName()

std::string gem5::RegClass::regName ( const RegId & id) const
inline

Definition at line 244 of file reg_class.hh.

References _ops, and gem5::RegClassOps::regName().

◆ regShift()

size_t gem5::RegClass::regShift ( ) const
inlineconstexpr

Definition at line 240 of file reg_class.hh.

References _regShift.

◆ regType()

template<class RegType >
RegClass gem5::RegClass::regType ( ) const
inlineconstexpr

Definition at line 228 of file reg_class.hh.

References _regBytes, _regShift, and gem5::ceilLog2().

◆ type()

RegClassType gem5::RegClass::type ( ) const
inlineconstexpr

◆ valString() [1/2]

std::string gem5::RegClass::valString ( const void * val) const
inline

◆ valString() [2/2]

std::string gem5::RegClass::valString ( const void * val,
const uint64_t & num_bytes ) const
inline

Definition at line 251 of file reg_class.hh.

References _ops, regBytes(), gem5::X86ISA::val, and gem5::RegClassOps::valString().

Member Data Documentation

◆ _flat

bool gem5::RegClass::_flat = true
private

Definition at line 202 of file reg_class.hh.

Referenced by isFlat(), and needsFlattening().

◆ _name

const char* gem5::RegClass::_name
private

Definition at line 189 of file reg_class.hh.

Referenced by name().

◆ _numRegs

size_t gem5::RegClass::_numRegs
private

Definition at line 191 of file reg_class.hh.

Referenced by numRegs().

◆ _ops

const RegClassOps* gem5::RegClass::_ops = &defaultOps
private

Definition at line 199 of file reg_class.hh.

Referenced by flatten(), ops(), regName(), valString(), and valString().

◆ _regBytes

size_t gem5::RegClass::_regBytes = sizeof(RegVal)
private

Definition at line 192 of file reg_class.hh.

Referenced by regBytes(), and regType().

◆ _regShift

size_t gem5::RegClass::_regShift = ceilLog2(sizeof(RegVal))
private

Definition at line 196 of file reg_class.hh.

Referenced by regShift(), and regType().

◆ _type

RegClassType gem5::RegClass::_type
private

Definition at line 188 of file reg_class.hh.

Referenced by type().

◆ debugFlag

const debug::Flag& gem5::RegClass::debugFlag
private

Definition at line 200 of file reg_class.hh.

Referenced by debug().

◆ defaultOps

RegClassOps gem5::RegClass::defaultOps
inlinestaticprivate

Definition at line 198 of file reg_class.hh.


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