gem5
v21.0.1.0
|
Collect register related information into a single struct. More...
#include <base_dyn_inst.hh>
Public Member Functions | |
size_t | numSrcs () const |
size_t | numDests () const |
void | init () |
Regs (size_t srcs, size_t dests) | |
const RegId & | flattenedDestIdx (int idx) const |
void | flattenedDestIdx (int idx, const RegId ®_id) |
PhysRegIdPtr | renamedDestIdx (int idx) const |
void | renamedDestIdx (int idx, PhysRegIdPtr phys_reg_id) |
PhysRegIdPtr | prevDestIdx (int idx) const |
void | prevDestIdx (int idx, PhysRegIdPtr phys_reg_id) |
PhysRegIdPtr | renamedSrcIdx (int idx) const |
void | renamedSrcIdx (int idx, PhysRegIdPtr phys_reg_id) |
bool | readySrcIdx (int idx) const |
void | readySrcIdx (int idx, bool ready) |
Private Types | |
using | BackingStorePtr = std::unique_ptr< uint8_t[]> |
using | BufCursor = BackingStorePtr::pointer |
Static Private Member Functions | |
static size_t | bytesForDests (size_t num) |
static size_t | bytesForSources (size_t num) |
template<class T > | |
static void | allocate (T *&ptr, BufCursor &cur, size_t count) |
Private Attributes | |
size_t | _numSrcs |
size_t | _numDests |
size_t | srcsReady = 0 |
BackingStorePtr | buf |
RegId * | _flatDestIdx |
PhysRegIdPtr * | _destIdx |
PhysRegIdPtr * | _prevDestIdx |
PhysRegIdPtr * | _srcIdx |
uint8_t * | _readySrcIdx |
Collect register related information into a single struct.
The number of source and destination registers can vary, and storage for information about them needs to be allocated dynamically. This class figures out how much space is needed and allocates it all at once, and then trivially divies it up for each type of per-register array.
Definition at line 188 of file base_dyn_inst.hh.
|
private |
Definition at line 196 of file base_dyn_inst.hh.
|
private |
Definition at line 197 of file base_dyn_inst.hh.
|
inline |
Definition at line 253 of file base_dyn_inst.hh.
References BaseDynInst< Impl >::Regs::_destIdx, BaseDynInst< Impl >::Regs::_flatDestIdx, BaseDynInst< Impl >::Regs::_prevDestIdx, BaseDynInst< Impl >::Regs::_readySrcIdx, BaseDynInst< Impl >::Regs::_srcIdx, BaseDynInst< Impl >::Regs::allocate(), BaseDynInst< Impl >::Regs::buf, and BaseDynInst< Impl >::Regs::init().
|
inlinestaticprivate |
Definition at line 237 of file base_dyn_inst.hh.
References RefCounted::count.
Referenced by BaseDynInst< Impl >::Regs::Regs().
|
inlinestaticprivate |
Definition at line 217 of file base_dyn_inst.hh.
|
inlinestaticprivate |
Definition at line 229 of file base_dyn_inst.hh.
|
inline |
Definition at line 269 of file base_dyn_inst.hh.
References BaseDynInst< Impl >::Regs::_flatDestIdx.
|
inline |
Definition at line 277 of file base_dyn_inst.hh.
References BaseDynInst< Impl >::Regs::_flatDestIdx.
|
inline |
Definition at line 248 of file base_dyn_inst.hh.
References BaseDynInst< Impl >::Regs::_readySrcIdx, MipsISA::fill, and BaseDynInst< Impl >::Regs::numSrcs().
Referenced by BaseDynInst< Impl >::Regs::Regs().
|
inline |
Definition at line 245 of file base_dyn_inst.hh.
References BaseDynInst< Impl >::Regs::_numDests.
Referenced by BaseDynInst< Impl >::numDestRegs().
|
inline |
Definition at line 244 of file base_dyn_inst.hh.
References BaseDynInst< Impl >::Regs::_numSrcs.
Referenced by BaseDynInst< Impl >::Regs::init(), and BaseDynInst< Impl >::numSrcRegs().
|
inline |
Definition at line 300 of file base_dyn_inst.hh.
References BaseDynInst< Impl >::Regs::_prevDestIdx.
Referenced by BaseO3DynInst< Impl >::forwardOldRegs(), and BaseDynInst< Impl >::renameDestReg().
|
inline |
Definition at line 307 of file base_dyn_inst.hh.
References BaseDynInst< Impl >::Regs::_prevDestIdx.
|
inline |
Definition at line 326 of file base_dyn_inst.hh.
References BaseDynInst< Impl >::Regs::_readySrcIdx, and bits().
|
inline |
Definition at line 333 of file base_dyn_inst.hh.
References BaseDynInst< Impl >::Regs::_readySrcIdx, and replaceBits().
|
inline |
Definition at line 285 of file base_dyn_inst.hh.
References BaseDynInst< Impl >::Regs::_destIdx.
Referenced by BaseO3DynInst< Impl >::getWritableVecPredRegOperand(), BaseO3DynInst< Impl >::getWritableVecRegOperand(), BaseDynInst< Impl >::renameDestReg(), BaseO3DynInst< Impl >::setCCRegOperand(), BaseO3DynInst< Impl >::setFloatRegOperandBits(), BaseO3DynInst< Impl >::setIntRegOperand(), BaseO3DynInst< Impl >::setVecElemOperand(), BaseO3DynInst< Impl >::setVecLaneOperandT(), BaseO3DynInst< Impl >::setVecPredRegOperand(), and BaseO3DynInst< Impl >::setVecRegOperand().
|
inline |
Definition at line 292 of file base_dyn_inst.hh.
References BaseDynInst< Impl >::Regs::_destIdx.
|
inline |
Definition at line 314 of file base_dyn_inst.hh.
References BaseDynInst< Impl >::Regs::_srcIdx.
Referenced by BaseO3DynInst< Impl >::readCCRegOperand(), BaseO3DynInst< Impl >::readFloatRegOperandBits(), BaseO3DynInst< Impl >::readIntRegOperand(), BaseO3DynInst< Impl >::readVec16BitLaneOperand(), BaseO3DynInst< Impl >::readVec32BitLaneOperand(), BaseO3DynInst< Impl >::readVec64BitLaneOperand(), BaseO3DynInst< Impl >::readVec8BitLaneOperand(), BaseO3DynInst< Impl >::readVecElemOperand(), BaseO3DynInst< Impl >::readVecPredRegOperand(), BaseO3DynInst< Impl >::readVecRegOperand(), and BaseDynInst< Impl >::renameSrcReg().
|
inline |
Definition at line 320 of file base_dyn_inst.hh.
References BaseDynInst< Impl >::Regs::_srcIdx.
|
private |
Definition at line 210 of file base_dyn_inst.hh.
Referenced by BaseDynInst< Impl >::Regs::Regs(), and BaseDynInst< Impl >::Regs::renamedDestIdx().
|
private |
Definition at line 206 of file base_dyn_inst.hh.
Referenced by BaseDynInst< Impl >::Regs::flattenedDestIdx(), and BaseDynInst< Impl >::Regs::Regs().
|
private |
Definition at line 192 of file base_dyn_inst.hh.
Referenced by BaseDynInst< Impl >::Regs::numDests().
|
private |
Definition at line 191 of file base_dyn_inst.hh.
Referenced by BaseDynInst< Impl >::Regs::numSrcs().
|
private |
Definition at line 214 of file base_dyn_inst.hh.
Referenced by BaseDynInst< Impl >::Regs::prevDestIdx(), and BaseDynInst< Impl >::Regs::Regs().
|
private |
Definition at line 226 of file base_dyn_inst.hh.
Referenced by BaseDynInst< Impl >::Regs::init(), BaseDynInst< Impl >::Regs::readySrcIdx(), and BaseDynInst< Impl >::Regs::Regs().
|
private |
Definition at line 223 of file base_dyn_inst.hh.
Referenced by BaseDynInst< Impl >::Regs::Regs(), and BaseDynInst< Impl >::Regs::renamedSrcIdx().
|
private |
Definition at line 199 of file base_dyn_inst.hh.
Referenced by BaseDynInst< Impl >::Regs::Regs().
|
private |
Definition at line 194 of file base_dyn_inst.hh.