gem5
|
#include <mem.hh>
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 () |
AddrOperandBase * | getAddressOperand () |
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 | |
HsailCode * | hsailCode |
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 |
|
inline |
Definition at line 402 of file mem.hh.
References HsailISA::LdaInstBase< DestOperandType, AddrOperandType >::addr, Brig::BRIG_KIND_OPERAND_OPERAND_LIST, Brig::BrigOperandOperandList::elements, BrigObject::getData(), BrigObject::getOperand(), BrigObject::getOperandPtr(), ArmISA::i, Brig::BrigBase::kind, and Brig::BrigInstBase::operands.
|
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.
|
inlineoverrideprivatevirtual |
Reimplemented from GPUStaticInst.
Definition at line 581 of file mem.hh.
References Request::ACQUIRE, GPUStaticInst::isLocalMem(), and Request::setFlags().
|
overridevirtual |
Implements GPUStaticInst.
Definition at line 165 of file mem_impl.hh.
References addr, Brig::BRIG_SEGMENT_ARG, Brig::BRIG_SEGMENT_GLOBAL, Brig::BRIG_SEGMENT_GROUP, Brig::BRIG_SEGMENT_KERNARG, Brig::BRIG_SEGMENT_PRIVATE, Brig::BRIG_SEGMENT_READONLY, Brig::BRIG_SEGMENT_SPILL, HsailISA::calcPrivAddr(), Wavefront::computeUnit, ComputeUnit::cu_id, DPRINTF, Wavefront::execMask(), fatal, LocalMemPipeline::getLMReqFIFO(), Wavefront::getPred(), GLBMEM_PIPE, ComputeUnit::globalMemoryPipe, ArmISA::i, GlobalMemPipeline::issueRequest(), Wavefront::kernelArgs, Wavefront::kernId, Wavefront::lastAddr, LDSMEM_PIPE, ComputeUnit::localMemoryPipe, ArmISA::m, ArmISA::mask, Wavefront::memReqsInPipe, Wavefront::outstandingReqs, Wavefront::outstandingReqsRdGm, Wavefront::outstandingReqsRdLm, Wavefront::privBase, Wavefront::privSizePerItem, Wavefront::rdGmReqsInPipe, Wavefront::rdLmReqsInPipe, Wavefront::readCallArgMem(), Wavefront::roBase, Wavefront::roSize, ComputeUnit::shader, Wavefront::simdId, Wavefront::spillBase, Wavefront::spillSizePerItem, Wavefront::spillWidth, Shader::tick_cnt, Shader::ticks(), X86ISA::val, MipsISA::w, Wavefront::wfDynId, ComputeUnit::wfSize(), and Wavefront::wfSlotId.
|
overrideprivatevirtual |
Reimplemented from HsailISA::HsailGPUStaticInst.
Definition at line 77 of file mem_impl.hh.
References addr, csprintf(), fatal, ArmISA::opcode, and segmentNames.
|
inlineoverridevirtual |
Implements GPUStaticInst.
Definition at line 690 of file mem.hh.
References HsailISA::LdaInstBase< DestOperandType, AddrOperandType >::addr.
|
inlineoverridevirtual |
Implements GPUStaticInst.
Definition at line 661 of file mem.hh.
References HsailISA::LdaInstBase< DestOperandType, AddrOperandType >::addr, HsailISA::LdaInstBase< DestOperandType, AddrOperandType >::dest, and HsailISA::LdaInstBase< DestOperandType, AddrOperandType >::getNumOperands().
|
inlineoverridevirtual |
Implements GPUStaticInst.
Definition at line 676 of file mem.hh.
References HsailISA::LdaInstBase< DestOperandType, AddrOperandType >::addr, HsailISA::LdaInstBase< DestOperandType, AddrOperandType >::dest, and HsailISA::LdaInstBase< DestOperandType, AddrOperandType >::getNumOperands().
|
inlineoverridevirtual |
Reimplemented from GPUStaticInst.
Definition at line 436 of file mem.hh.
References ArmISA::d, Packet::dataStatic(), GPUStaticInst::execLdAcq(), ArmISA::i, GPUStaticInst::isLocalMem(), MipsISA::k, MemCmd::ReadReq, and MipsISA::vaddr.
|
inlineoverridevirtual |
Implements GPUStaticInst.
Definition at line 617 of file mem.hh.
References HsailISA::LdaInstBase< DestOperandType, AddrOperandType >::addr, HsailISA::LdaInstBase< DestOperandType, AddrOperandType >::dest, and HsailISA::LdaInstBase< DestOperandType, AddrOperandType >::getNumOperands().
|
inlineoverridevirtual |
Implements GPUStaticInst.
Definition at line 653 of file mem.hh.
References HsailISA::LdaInstBase< DestOperandType, AddrOperandType >::getNumOperands().
|
inlineoverridevirtual |
Implements GPUStaticInst.
Definition at line 631 of file mem.hh.
References HsailISA::LdaInstBase< DestOperandType, AddrOperandType >::addr, HsailISA::LdaInstBase< DestOperandType, AddrOperandType >::dest, and HsailISA::LdaInstBase< DestOperandType, AddrOperandType >::getNumOperands().
|
inlineoverridevirtual |
Implements GPUStaticInst.
Definition at line 645 of file mem.hh.
References HsailISA::LdaInstBase< DestOperandType, AddrOperandType >::addr, and HsailISA::LdaInstBase< DestOperandType, AddrOperandType >::getNumOperands().
|
inlineoverridevirtual |
Implements GPUStaticInst.
Definition at line 601 of file mem.hh.
References HsailISA::LdaInstBase< DestOperandType, AddrOperandType >::addr, HsailISA::LdaInstBase< DestOperandType, AddrOperandType >::dest, and HsailISA::LdaInstBase< DestOperandType, AddrOperandType >::getNumOperands().
|
private |
|
private |