gem5  v21.1.0.2
Public Types | Public Member Functions | Private Types | Private Attributes | List of all members
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. More...
 
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. More...
 
const int _size
 Size of the operand in bytes. More...
 
const int _numDWords
 Size of operand in DWords. More...
 
std::vector< int > _virtIndices
 
std::vector< int > _physIndices
 
std::vector< int > _bankReadCounts
 The number of reads this operand will make to each bank. More...
 

Detailed Description

Definition at line 44 of file operand_info.hh.

Member Typedef Documentation

◆ Flags

Definition at line 138 of file operand_info.hh.

◆ FlagsType

typedef uint32_t gem5::OperandInfo::FlagsType

Definition at line 137 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 142 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 132 of file operand_info.hh.

References _bankReadCounts.

◆ isDst()

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

Definition at line 94 of file operand_info.hh.

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

◆ isExec()

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

Definition at line 99 of file operand_info.hh.

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

◆ isFlatScratch()

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

Definition at line 100 of file operand_info.hh.

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

◆ isImm()

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

Definition at line 95 of file operand_info.hh.

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

◆ isScalarReg()

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

Definition at line 96 of file operand_info.hh.

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

◆ isSrc()

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

Definition at line 93 of file operand_info.hh.

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

◆ isVcc()

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

Definition at line 98 of file operand_info.hh.

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

◆ isVectorReg()

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

Definition at line 97 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 75 of file operand_info.hh.

References _numDWords, and gem5::Gcn3ISA::RegSizeDWords.

◆ physIdx()

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

Definition at line 117 of file operand_info.hh.

References _physIndices.

◆ physIndices()

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

Definition at line 126 of file operand_info.hh.

References _physIndices.

◆ rawRegisterIndex()

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

Definition at line 81 of file operand_info.hh.

References _opSelectorVal.

◆ registerIndex()

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

◆ setVirtToPhysMapping()

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

Definition at line 103 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 78 of file operand_info.hh.

References _size.

◆ sizeInDWords()

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

Definition at line 76 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 116 of file operand_info.hh.

References _virtIndices.

◆ virtIndices()

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

Definition at line 120 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 197 of file operand_info.hh.

Referenced by bankReadCounts().

◆ _numDWords

const int gem5::OperandInfo::_numDWords
private

Size of operand in DWords.

Definition at line 189 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 179 of file operand_info.hh.

Referenced by rawRegisterIndex(), and registerIndex().

◆ _physIndices

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

Definition at line 192 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 184 of file operand_info.hh.

Referenced by size().

◆ _virtIndices

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

Definition at line 191 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 Sep 21 2021 12:27:52 for gem5 by doxygen 1.8.17