gem5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Private Member Functions | Private Attributes | List of all members
HsailISA::LdInst< MemDataType, DestDataType, AddrOperandType > Class Template Reference

#include <mem.hh>

Inheritance diagram for HsailISA::LdInst< MemDataType, DestDataType, AddrOperandType >:
HsailISA::LdInstBase< MemDataType::CType, DestDataType::OperandType, AddrOperandType > HsailISA::MemInst HsailISA::HsailGPUStaticInst GPUStaticInst

Public Member Functions

 LdInst (const Brig::BrigInstBase *ib, const BrigObject *obj, const char *_opcode)
 
void initiateAcc (GPUDynInstPtr gpuDynInst) override
 
void completeAcc (GPUDynInstPtr gpuDynInst) override
 
bool isVectorRegister (int operandIndex) override
 
bool isCondRegister (int operandIndex) override
 
bool isScalarRegister (int operandIndex) override
 
bool isSrcOperand (int operandIndex) override
 
bool isDstOperand (int operandIndex) override
 
int getOperandSize (int operandIndex) override
 
int getRegisterIndex (int operandIndex, GPUDynInstPtr gpuDynInst) override
 
int getNumOperands () override
 
void execute (GPUDynInstPtr gpuDynInst) override
 
- Public Member Functions inherited from HsailISA::LdInstBase< MemDataType::CType, DestDataType::OperandType, AddrOperandType >
 LdInstBase (const Brig::BrigInstBase *ib, const BrigObject *obj, const char *_opcode)
 
int numSrcRegOperands () override
 
int numDstRegOperands () override
 
int getNumOperands () override
 
bool isVectorRegister (int operandIndex) override
 
bool isCondRegister (int operandIndex) override
 
bool isScalarRegister (int operandIndex) override
 
bool isSrcOperand (int operandIndex) override
 
bool isDstOperand (int operandIndex) override
 
int getOperandSize (int operandIndex) override
 
int getRegisterIndex (int operandIndex, GPUDynInstPtr gpuDynInst) override
 
- Public Member Functions inherited from HsailISA::HsailGPUStaticInst
 HsailGPUStaticInst (const BrigObject *obj, const std::string &opcode)
 
int instSize () const override
 
bool isValid () const override
 
- Public Member Functions inherited from GPUStaticInst
 GPUStaticInst (const std::string &opcode)
 
void instAddr (int inst_addr)
 
int instAddr () const
 
int nextInstAddr () const
 
void instNum (int num)
 
int instNum ()
 
void ipdInstNum (int num)
 
int ipdInstNum () const
 
const std::string & disassemble ()
 
bool isALU () const
 
bool isBranch () const
 
bool isNop () const
 
bool isReturn () const
 
bool isUnconditionalJump () const
 
bool isSpecialOp () const
 
bool isWaitcnt () const
 
bool isBarrier () const
 
bool isMemFence () const
 
bool isMemRef () const
 
bool isFlat () const
 
bool isLoad () const
 
bool isStore () const
 
bool isAtomic () const
 
bool isAtomicNoRet () const
 
bool isAtomicRet () const
 
bool isScalar () const
 
bool readsSCC () const
 
bool writesSCC () const
 
bool readsVCC () const
 
bool writesVCC () const
 
bool isAtomicAnd () const
 
bool isAtomicOr () const
 
bool isAtomicXor () const
 
bool isAtomicCAS () const
 
bool isAtomicExch () const
 
bool isAtomicAdd () const
 
bool isAtomicSub () const
 
bool isAtomicInc () const
 
bool isAtomicDec () const
 
bool isAtomicMax () const
 
bool isAtomicMin () const
 
bool isArgLoad () const
 
bool isGlobalMem () const
 
bool isLocalMem () const
 
bool isArgSeg () const
 
bool isGlobalSeg () const
 
bool isGroupSeg () const
 
bool isKernArgSeg () const
 
bool isPrivateSeg () const
 
bool isReadOnlySeg () const
 
bool isSpillSeg () const
 
bool isWorkitemScope () const
 
bool isWavefrontScope () const
 
bool isWorkgroupScope () const
 
bool isDeviceScope () const
 
bool isSystemScope () const
 
bool isNoScope () const
 
bool isRelaxedOrder () const
 
bool isAcquire () const
 
bool isRelease () const
 
bool isAcquireRelease () const
 
bool isNoOrder () const
 
bool isGloballyCoherent () const
 Coherence domain of a memory instruction. More...
 
bool isSystemCoherent () const
 
virtual uint32_t getTargetPc ()
 
void setFlag (Flags flag)
 
virtual void execSt (GPUDynInstPtr gpuDynInst)
 
virtual void execAtomic (GPUDynInstPtr gpuDynInst)
 
virtual void execAtomicAcq (GPUDynInstPtr gpuDynInst)
 
- Public Member Functions inherited from HsailISA::MemInst
 MemInst ()
 
 MemInst (Enums::MemType m_type)
 
void init_addr (AddrOperandBase *_addr_operand)
 
int getMemOperandSize ()
 
AddrOperandBasegetAddressOperand ()
 

Private Member Functions

void generateDisassembly () override
 
void execLdAcq (GPUDynInstPtr gpuDynInst) override
 

Private Attributes

DestDataType::OperandType::DestOperand dest_vect [4]
 
uint16_t num_dest_operands
 

Additional Inherited Members

- Public Attributes inherited from HsailISA::LdInstBase< MemDataType::CType, DestDataType::OperandType, AddrOperandType >
Brig::BrigWidth8_t width
 
DestDataType::OperandType::DestOperand dest
 
AddrOperandType addr
 
Brig::BrigSegment segment
 
Brig::BrigMemoryOrder memoryOrder
 
Brig::BrigMemoryScope memoryScope
 
unsigned int equivClass
 
- Public Attributes inherited from GPUStaticInst
Enums::StorageClassType executed_as
 
- Static Public Attributes inherited from GPUStaticInst
static uint64_t dynamic_id_count
 
- Protected Attributes inherited from HsailISA::HsailGPUStaticInst
HsailCodehsailCode
 
- Protected Attributes inherited from GPUStaticInst
const std::string opcode
 
std::string disassembly
 
int _instNum
 
int _instAddr
 
int _ipdInstNum
 Identifier of the immediate post-dominator instruction. More...
 
std::bitset< Num_Flags > _flags
 

Detailed Description

template<typename MemDataType, typename DestDataType, typename AddrOperandType>
class HsailISA::LdInst< MemDataType, DestDataType, AddrOperandType >

Definition at line 392 of file mem.hh.

Constructor & Destructor Documentation

template<typename MemDataType, typename DestDataType, typename AddrOperandType>
HsailISA::LdInst< MemDataType, DestDataType, AddrOperandType >::LdInst ( const Brig::BrigInstBase ib,
const BrigObject obj,
const char *  _opcode 
)
inline

Member Function Documentation

template<typename MemDataType, typename DestDataType, typename AddrOperandType>
void HsailISA::LdInst< MemDataType, DestDataType, AddrOperandType >::completeAcc ( GPUDynInstPtr  gpuDynInst)
inlineoverridevirtual

this code essentially replaces the long if-else chain that was in used GlobalMemPipeline::exec() to infer the size (single/double) and type (floating point/integer) of the destination register. this is needed for load instructions because the loaded value and the destination type can be of different sizes, and we also need to know if the value we're writing back is floating point and signed/unsigned, so we can properly cast the writeback value

Reimplemented from GPUStaticInst.

Definition at line 500 of file mem.hh.

References Wavefront::computeUnit, ComputeUnit::cu_id, HsailISA::LdaInstBase< DestOperandType, AddrOperandType >::dest, DPRINTF, ArmISA::i, GPUStaticInst::isGlobalMem(), GPUStaticInst::isLocalMem(), MipsISA::k, MAX_REGS_FOR_NON_VEC_MEM_INST, MAX_WIDTH_FOR_MEM_INST, Wavefront::remap(), Wavefront::simdId, X86ISA::type, ComputeUnit::vrf, VT_32, MipsISA::w, ComputeUnit::wfSize(), and Wavefront::wfSlotId.

template<typename MemDataType, typename DestDataType, typename AddrOperandType>
void HsailISA::LdInst< MemDataType, DestDataType, AddrOperandType >::execLdAcq ( GPUDynInstPtr  gpuDynInst)
inlineoverrideprivatevirtual

Reimplemented from GPUStaticInst.

Definition at line 581 of file mem.hh.

References Request::ACQUIRE, GPUStaticInst::isLocalMem(), and Request::setFlags().

template<typename MemDataType , typename DestDataType , typename AddrRegOperandType >
void HsailISA::LdInst< MemDataType, DestDataType, AddrRegOperandType >::execute ( GPUDynInstPtr  gpuDynInst)
overridevirtual
template<typename MemDataType , typename DestDataType , typename AddrRegOperandType >
void HsailISA::LdInst< MemDataType, DestDataType, AddrRegOperandType >::generateDisassembly ( )
overrideprivatevirtual

Reimplemented from HsailISA::HsailGPUStaticInst.

Definition at line 77 of file mem_impl.hh.

References addr, csprintf(), fatal, ArmISA::opcode, and segmentNames.

template<typename MemDataType, typename DestDataType, typename AddrOperandType>
int HsailISA::LdInst< MemDataType, DestDataType, AddrOperandType >::getNumOperands ( )
inlineoverridevirtual

Implements GPUStaticInst.

Definition at line 690 of file mem.hh.

References HsailISA::LdaInstBase< DestOperandType, AddrOperandType >::addr.

template<typename MemDataType, typename DestDataType, typename AddrOperandType>
int HsailISA::LdInst< MemDataType, DestDataType, AddrOperandType >::getOperandSize ( int  operandIndex)
inlineoverridevirtual
template<typename MemDataType, typename DestDataType, typename AddrOperandType>
int HsailISA::LdInst< MemDataType, DestDataType, AddrOperandType >::getRegisterIndex ( int  operandIndex,
GPUDynInstPtr  gpuDynInst 
)
inlineoverridevirtual
template<typename MemDataType, typename DestDataType, typename AddrOperandType>
void HsailISA::LdInst< MemDataType, DestDataType, AddrOperandType >::initiateAcc ( GPUDynInstPtr  gpuDynInst)
inlineoverridevirtual
template<typename MemDataType, typename DestDataType, typename AddrOperandType>
bool HsailISA::LdInst< MemDataType, DestDataType, AddrOperandType >::isCondRegister ( int  operandIndex)
inlineoverridevirtual
template<typename MemDataType, typename DestDataType, typename AddrOperandType>
bool HsailISA::LdInst< MemDataType, DestDataType, AddrOperandType >::isDstOperand ( int  operandIndex)
inlineoverridevirtual
template<typename MemDataType, typename DestDataType, typename AddrOperandType>
bool HsailISA::LdInst< MemDataType, DestDataType, AddrOperandType >::isScalarRegister ( int  operandIndex)
inlineoverridevirtual
template<typename MemDataType, typename DestDataType, typename AddrOperandType>
bool HsailISA::LdInst< MemDataType, DestDataType, AddrOperandType >::isSrcOperand ( int  operandIndex)
inlineoverridevirtual
template<typename MemDataType, typename DestDataType, typename AddrOperandType>
bool HsailISA::LdInst< MemDataType, DestDataType, AddrOperandType >::isVectorRegister ( int  operandIndex)
inlineoverridevirtual

Member Data Documentation

template<typename MemDataType, typename DestDataType, typename AddrOperandType>
DestDataType::OperandType::DestOperand HsailISA::LdInst< MemDataType, DestDataType, AddrOperandType >::dest_vect[4]
private

Definition at line 397 of file mem.hh.

template<typename MemDataType, typename DestDataType, typename AddrOperandType>
uint16_t HsailISA::LdInst< MemDataType, DestDataType, AddrOperandType >::num_dest_operands
private

Definition at line 398 of file mem.hh.


The documentation for this class was generated from the following files:

Generated on Fri Jun 9 2017 13:04:32 for gem5 by doxygen 1.8.6