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

#include <operand_info.hh>

Public Types

typedef uint32_t FlagsType
 
typedef gem5::Flags< FlagsTypeFlags
 

Public Member Functions

 OperandInfo ()=delete
 
 OperandInfo (int opSelectorVal, int size, bool src, bool scalar_reg, bool vector_reg, bool imm)
 
int numRegisters () const
 
int sizeInDWords () const
 
int size () const
 
int rawRegisterIndex () const
 
int registerIndex (int numScalarRegs) const
 
bool isSrc () const
 
bool isDst () const
 
bool isImm () const
 
bool isScalarReg () const
 
bool isVectorReg () const
 
bool isVcc () const
 
bool isExec () const
 
bool isFlatScratch () const
 
void setVirtToPhysMapping (std::vector< int > v, std::vector< int > p)
 
int virtIdx (int reg_num=0) const
 We typically only need the first virtual register for the operand regardless of its size.
 
int physIdx (int reg_num=0) const
 
const std::vector< int > & virtIndices () const
 
const std::vector< int > & physIndices () const
 
std::vector< int > & bankReadCounts () const
 

Private Types

enum  : FlagsType {
  SRC = 0x00000001 , SCALAR_REG = 0x00000002 , VECTOR_REG = 0x00000004 , IMMEDIATE = 0x00000008 ,
  VCC = 0x00000010 , EXEC = 0x00000020 , FLAT = 0x00000040 , LITERAL = 0x00000080 ,
  CONSTANT = 0x00000100 , POS_CONST = 0x00000200
}
 

Private Attributes

Flags flags
 
const int _opSelectorVal
 Value of the operand as used in registers.cc functions.
 
const int _size
 Size of the operand in bytes.
 
const int _numDWords
 Size of operand in DWords.
 
std::vector< int > _virtIndices
 
std::vector< int > _physIndices
 
std::vector< int > _bankReadCounts
 The number of reads this operand will make to each bank.
 

Detailed Description

Definition at line 42 of file operand_info.hh.

Member Typedef Documentation

◆ Flags

Definition at line 136 of file operand_info.hh.

◆ FlagsType

typedef uint32_t gem5::OperandInfo::FlagsType

Definition at line 135 of file operand_info.hh.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum : FlagsType
private
Enumerator
SRC 
SCALAR_REG 
VECTOR_REG 
IMMEDIATE 
VCC 
EXEC 
FLAT 
LITERAL 
CONSTANT 
POS_CONST 

Definition at line 140 of file operand_info.hh.

Constructor & Destructor Documentation

◆ OperandInfo() [1/2]

gem5::OperandInfo::OperandInfo ( )
delete

◆ OperandInfo() [2/2]

gem5::OperandInfo::OperandInfo ( int opSelectorVal,
int size,
bool src,
bool scalar_reg,
bool vector_reg,
bool imm )
inline

Member Function Documentation

◆ bankReadCounts()

std::vector< int > & gem5::OperandInfo::bankReadCounts ( ) const
inline

Definition at line 130 of file operand_info.hh.

References _bankReadCounts.

◆ isDst()

bool gem5::OperandInfo::isDst ( ) const
inline

Definition at line 92 of file operand_info.hh.

References flags, gem5::Flags< T >::isSet(), and SRC.

◆ isExec()

bool gem5::OperandInfo::isExec ( ) const
inline

Definition at line 97 of file operand_info.hh.

References EXEC, flags, and gem5::Flags< T >::isSet().

◆ isFlatScratch()

bool gem5::OperandInfo::isFlatScratch ( ) const
inline

Definition at line 98 of file operand_info.hh.

References flags, FLAT, and gem5::Flags< T >::isSet().

◆ isImm()

bool gem5::OperandInfo::isImm ( ) const
inline

Definition at line 93 of file operand_info.hh.

References flags, IMMEDIATE, and gem5::Flags< T >::isSet().

◆ isScalarReg()

bool gem5::OperandInfo::isScalarReg ( ) const
inline

Definition at line 94 of file operand_info.hh.

References flags, gem5::Flags< T >::isSet(), and SCALAR_REG.

◆ isSrc()

bool gem5::OperandInfo::isSrc ( ) const
inline

Definition at line 91 of file operand_info.hh.

References flags, gem5::Flags< T >::isSet(), and SRC.

◆ isVcc()

bool gem5::OperandInfo::isVcc ( ) const
inline

Definition at line 96 of file operand_info.hh.

References flags, gem5::Flags< T >::isSet(), and VCC.

◆ isVectorReg()

bool gem5::OperandInfo::isVectorReg ( ) const
inline

Definition at line 95 of file operand_info.hh.

References flags, gem5::Flags< T >::isSet(), and VECTOR_REG.

Referenced by registerIndex().

◆ numRegisters()

int gem5::OperandInfo::numRegisters ( ) const
inline

Definition at line 73 of file operand_info.hh.

References _numDWords.

◆ physIdx()

int gem5::OperandInfo::physIdx ( int reg_num = 0) const
inline

Definition at line 115 of file operand_info.hh.

References _physIndices.

◆ physIndices()

const std::vector< int > & gem5::OperandInfo::physIndices ( ) const
inline

Definition at line 124 of file operand_info.hh.

References _physIndices.

◆ rawRegisterIndex()

int gem5::OperandInfo::rawRegisterIndex ( ) const
inline

Definition at line 79 of file operand_info.hh.

References _opSelectorVal.

◆ registerIndex()

int gem5::OperandInfo::registerIndex ( int numScalarRegs) const
inline

Definition at line 82 of file operand_info.hh.

References _opSelectorVal, and isVectorReg().

◆ setVirtToPhysMapping()

void gem5::OperandInfo::setVirtToPhysMapping ( std::vector< int > v,
std::vector< int > p )
inline

Definition at line 101 of file operand_info.hh.

References _numDWords, _physIndices, _virtIndices, gem5::MipsISA::p, and gem5::ArmISA::v.

◆ size()

int gem5::OperandInfo::size ( ) const
inline

Definition at line 76 of file operand_info.hh.

References _size.

◆ sizeInDWords()

int gem5::OperandInfo::sizeInDWords ( ) const
inline

Definition at line 74 of file operand_info.hh.

References _numDWords.

◆ virtIdx()

int gem5::OperandInfo::virtIdx ( int reg_num = 0) const
inline

We typically only need the first virtual register for the operand regardless of its size.

Definition at line 114 of file operand_info.hh.

References _virtIndices.

◆ virtIndices()

const std::vector< int > & gem5::OperandInfo::virtIndices ( ) const
inline

Definition at line 118 of file operand_info.hh.

References _virtIndices.

Member Data Documentation

◆ _bankReadCounts

std::vector<int> gem5::OperandInfo::_bankReadCounts
mutableprivate

The number of reads this operand will make to each bank.

Definition at line 195 of file operand_info.hh.

Referenced by bankReadCounts().

◆ _numDWords

const int gem5::OperandInfo::_numDWords
private

Size of operand in DWords.

Definition at line 187 of file operand_info.hh.

Referenced by numRegisters(), setVirtToPhysMapping(), and sizeInDWords().

◆ _opSelectorVal

const int gem5::OperandInfo::_opSelectorVal
private

Value of the operand as used in registers.cc functions.

Definition at line 177 of file operand_info.hh.

Referenced by rawRegisterIndex(), and registerIndex().

◆ _physIndices

std::vector<int> gem5::OperandInfo::_physIndices
private

Definition at line 190 of file operand_info.hh.

Referenced by physIdx(), physIndices(), and setVirtToPhysMapping().

◆ _size

const int gem5::OperandInfo::_size
private

Size of the operand in bytes.

Definition at line 182 of file operand_info.hh.

Referenced by size().

◆ _virtIndices

std::vector<int> gem5::OperandInfo::_virtIndices
private

Definition at line 189 of file operand_info.hh.

Referenced by setVirtToPhysMapping(), virtIdx(), and virtIndices().

◆ flags

Flags gem5::OperandInfo::flags
private

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