54 _srcLiteral = *
reinterpret_cast<uint32_t*
>(&iFmt[1]);
82 std::stringstream dis_stream;
83 dis_stream << _opcode <<
" ";
87 dis_stream <<
"0x" << std::hex << std::setfill(
'0') << std::setw(8)
94 dis_stream <<
"0x" << std::hex << std::setfill(
'0') << std::setw(8)
117 fatal(
"Operand at idx %i does not exist\n", opIdx);
141 gpuDynInst->wavefront()->reservedScalarRegs);
144 gpuDynInst->wavefront()->reservedScalarRegs);
147 gpuDynInst->wavefront()->reservedScalarRegs);
149 fatal(
"Operand at idx %i does not exist\n", opIdx);
178 std::stringstream dis_stream;
179 dis_stream << _opcode <<
" ";
182 dis_stream <<
"0x" << std::hex << std::setfill(
'0') << std::setw(4)
200 fatal(
"Operand at idx %i does not exist\n", opIdx);
226 gpuDynInst->wavefront()->reservedScalarRegs);
228 fatal(
"Operand at idx %i does not exist\n", opIdx);
245 _srcLiteral = *
reinterpret_cast<uint32_t*
>(&iFmt[1]);
274 std::stringstream dis_stream;
275 dis_stream << _opcode <<
" ";
279 dis_stream <<
"0x" << std::hex << std::setfill(
'0') << std::setw(8)
300 fatal(
"Operand at idx %i does not exist\n", opIdx);
324 gpuDynInst->wavefront()->reservedScalarRegs);
327 gpuDynInst->wavefront()->reservedScalarRegs);
329 fatal(
"Operand at idx %i does not exist\n", opIdx);
346 _srcLiteral = *
reinterpret_cast<uint32_t*
>(&iFmt[1]);
378 std::stringstream dis_stream;
379 dis_stream << _opcode <<
" ";
382 dis_stream <<
"0x" << std::hex << std::setfill(
'0') << std::setw(8)
389 dis_stream <<
"0x" << std::hex << std::setfill(
'0') << std::setw(8)
412 fatal(
"Operand at idx %i does not exist\n", opIdx);
436 gpuDynInst->wavefront()->reservedScalarRegs);
439 gpuDynInst->wavefront()->reservedScalarRegs);
441 fatal(
"Operand at idx %i does not exist\n", opIdx);
470 std::stringstream dis_stream;
471 dis_stream << _opcode;
478 dis_stream <<
"label_" << std::hex << dest;
496 dis_stream <<
"vmcnt(" << vm_cnt <<
")";
499 if (lgkm_cnt != 0xf) {
503 dis_stream <<
"lgkmcnt(" << lgkm_cnt <<
")";
506 if (exp_cnt != 0x7) {
507 if (vm_cnt != 0xf || lgkm_cnt != 0xf)
510 dis_stream <<
"expcnt(" << exp_cnt <<
")";
566 _srcLiteral = *
reinterpret_cast<uint32_t*
>(&iFmt[1]);
585 std::stringstream dis_stream;
586 dis_stream << _opcode <<
" ";
605 dis_stream <<
"0x" << std::hex << std::setfill(
'0') << std::setw(2)
636 fatal(
"Operand at idx %i does not exist\n", opIdx);
662 gpuDynInst->wavefront()->reservedScalarRegs);
672 gpuDynInst->wavefront()->reservedScalarRegs);
674 fatal(
"Operand at idx %i does not exist\n", opIdx);
689 _srcLiteral = *
reinterpret_cast<uint32_t*
>(&iFmt[1]);
730 iFmt->
OP == 0x18 || iFmt->
OP == 0x24 || iFmt->
OP == 0x25)
739 std::stringstream dis_stream;
740 dis_stream << _opcode <<
" ";
744 dis_stream <<
"vcc, ";
749 dis_stream <<
"0x" << std::hex << std::setfill(
'0') << std::setw(8)
762 dis_stream <<
"0x" << std::hex << std::setfill(
'0') << std::setw(8)
769 dis_stream <<
", vcc";
812 fatal(
"Operand at idx %i does not exist\n", opIdx);
855 fatal(
"Operand at idx %i does not exist\n", opIdx);
869 gpuDynInst->wavefront()->reservedScalarRegs);
875 gpuDynInst->wavefront()->reservedScalarRegs);
885 gpuDynInst->wavefront()->reservedScalarRegs);
890 gpuDynInst->wavefront()->reservedScalarRegs);
892 fatal(
"Operand at idx %i does not exist\n", opIdx);
907 _srcLiteral = *
reinterpret_cast<uint32_t*
>(&iFmt[1]);
951 std::stringstream dis_stream;
952 dis_stream << _opcode <<
" ";
958 dis_stream <<
"0x" << std::hex << std::setfill(
'0') << std::setw(8)
980 fatal(
"Operand at idx %i does not exist\n", opIdx);
998 fatal(
"Operand at idx %i does not exist\n", opIdx);
1012 gpuDynInst->wavefront()->reservedScalarRegs);
1016 fatal(
"Operand at idx %i does not exist\n", opIdx);
1031 _srcLiteral = *
reinterpret_cast<uint32_t*
>(&iFmt[1]);
1075 std::stringstream dis_stream;
1076 dis_stream << _opcode <<
" vcc, ";
1100 fatal(
"Operand at idx %i does not exist\n", opIdx);
1121 fatal(
"Operand at idx %i does not exist\n", opIdx);
1135 gpuDynInst->wavefront()->reservedScalarRegs);
1141 gpuDynInst->wavefront()->reservedScalarRegs);
1143 fatal(
"Operand at idx %i does not exist\n", opIdx);
1177 _srcLiteral = *
reinterpret_cast<uint32_t*
>(&iFmt[1]);
1193 std::stringstream dis_stream;
1194 dis_stream << _opcode <<
" ";
1204 num_regs - 1 <<
"], ";
1317 fatal(
"Operand at idx %i does not exist\n", opIdx);
1391 fatal(
"Operand at idx %i does not exist\n", opIdx);
1406 gpuDynInst->wavefront()->reservedScalarRegs);
1412 gpuDynInst->wavefront()->reservedScalarRegs);
1418 gpuDynInst->wavefront()->reservedScalarRegs);
1429 gpuDynInst->wavefront()->reservedScalarRegs);
1436 gpuDynInst->wavefront()->reservedScalarRegs);
1445 gpuDynInst->wavefront()->reservedScalarRegs);
1453 gpuDynInst->wavefront()->reservedScalarRegs);
1461 gpuDynInst->wavefront()->reservedScalarRegs);
1468 gpuDynInst->wavefront()->reservedScalarRegs);
1470 fatal(
"Operand at idx %i does not exist\n", opIdx);
1478 const std::string &
opcode)
1485 _srcLiteral = *
reinterpret_cast<uint32_t*
>(&iFmt[1]);
1501 std::stringstream dis_stream;
1502 dis_stream << _opcode <<
" ";
1537 dis_stream <<
", vcc";
1611 fatal(
"Operand at idx %i does not exist\n", opIdx);
1685 fatal(
"Operand at idx %i does not exist\n", opIdx);
1700 gpuDynInst->wavefront()->reservedScalarRegs);
1706 gpuDynInst->wavefront()->reservedScalarRegs);
1717 gpuDynInst->wavefront()->reservedScalarRegs);
1727 gpuDynInst->wavefront()->reservedScalarRegs);
1739 gpuDynInst->wavefront()->reservedScalarRegs);
1746 gpuDynInst->wavefront()->reservedScalarRegs);
1748 fatal(
"Operand at idx %i does not exist\n", opIdx);
1764 _srcLiteral = *
reinterpret_cast<uint32_t*
>(&iFmt[1]);
1780 std::stringstream dis_stream;
1781 dis_stream << _opcode <<
" ";
1805 dis_stream <<
" offset:" <<
offset;
1855 fatal(
"Operand at idx %i does not exist\n", opIdx);
1869 _srcLiteral = *
reinterpret_cast<uint32_t*
>(&iFmt[1]);
1893 std::stringstream dis_stream;
1894 dis_stream << _opcode <<
" ";
1896 dis_stream <<
"s[" << srsrc_val <<
":" 1897 << srsrc_val + 3 <<
"], ";
1922 fatal(
"Operand at idx %i does not exist\n", opIdx);
1943 fatal(
"Operand at idx %i does not exist\n", opIdx);
1965 fatal(
"Operand at idx %i does not exist\n", opIdx);
1979 _srcLiteral = *
reinterpret_cast<uint32_t*
>(&iFmt[1]);
2008 _srcLiteral = *
reinterpret_cast<uint32_t*
>(&iFmt[1]);
2036 _srcLiteral = *
reinterpret_cast<uint32_t*
>(&iFmt[1]);
2059 _srcLiteral = *
reinterpret_cast<uint32_t*
>(&iFmt[1]);
2081 std::stringstream dis_stream;
2082 dis_stream << _opcode <<
" ";
2144 fatal(
"Unsupported flat instr type\n");
2152 fatal(
"Operand at idx %i does not exist\n", opIdx);
int getRegisterIndex(int opIdx, GPUDynInstPtr gpuDynInst) override
bool hasSecondDword(InFmt_SOP2 *)
int getRegisterIndex(int opIdx, GPUDynInstPtr gpuDynInst) override
bool isScalarRegister(int opIdx) override
int getRegisterIndex(int opIdx, GPUDynInstPtr gpuDynInst) override
int getRegisterIndex(int opIdx, GPUDynInstPtr gpuDynInst) override
bool isVectorRegister(int opIdx) override
int instSize() const override
#define fatal(...)
This implements a cprintf based fatal() function.
bool isScalarRegister(int opIdx) override
Inst_SOP1(InFmt_SOP1 *, const std::string &opcode)
bool isScalarRegister(int opIdx) override
int instSize() const override
bool isScalarReg(int opIdx)
bool isVectorRegister(int opIdx) override
int instSize() const override
bool isScalarRegister(int opIdx) override
int getRegisterIndex(int opIdx, GPUDynInstPtr gpuDynInst) override
int instSize() const override
void generateDisassembly() override
bool isVectorRegister(int opIdx) override
Inst_VOP1(InFmt_VOP1 *, const std::string &opcode)
void generateDisassembly() override
int instSize() const override
Inst_EXP(InFmt_EXP *, const std::string &opcode)
void generateDisassembly() override
Inst_SOPK(InFmt_SOPK *, const std::string &opcode)
int getRegisterIndex(int opIdx, GPUDynInstPtr gpuDynInst) override
int instSize() const override
bool isScalarRegister(int opIdx) override
void generateDisassembly() override
void generateDisassembly() override
int instSize() const override
Inst_VINTRP(InFmt_VINTRP *, const std::string &opcode)
bool isVectorRegister(int opIdx) override
bool isScalarRegister(int opIdx) override
int instSize() const override
Inst_VOPC(InFmt_VOPC *, const std::string &opcode)
bool isVectorReg(int opIdx)
bool isVectorRegister(int opIdx) override
std::shared_ptr< GPUDynInst > GPUDynInstPtr
void generateDisassembly() override
Inst_DS(InFmt_DS *, const std::string &opcode)
InFmt_VOP3_SDST_ENC instData
virtual int numDstRegOperands()=0
void generateDisassembly() override
Inst_VOP2(InFmt_VOP2 *, const std::string &opcode)
bool isVectorRegister(int opIdx) override
int instSize() const override
bool isVectorRegister(int opIdx) override
bool isVectorRegister(int opIdx) override
classes that represnt vector/scalar operands in GCN3 ISA.
bool isScalarRegister(int opIdx) override
void generateDisassembly() override
int getRegisterIndex(int opIdx, GPUDynInstPtr gpuDynInst) override
Inst_SMEM(InFmt_SMEM *, const std::string &opcode)
Inst_SOP2(InFmt_SOP2 *, const std::string &opcode)
bool hasSecondDword(InFmt_SOP1 *)
int instSize() const override
int instSize() const override
int opSelectorToRegIdx(int idx, int numScalarRegs)
Inst_VOP3(InFmt_VOP3 *, const std::string &opcode, bool sgpr_dst)
void generateDisassembly() override
bool hasSecondDword(InFmt_SOPC *)
bool isVectorRegister(int opIdx) override
const bool sgprDst
the v_cmp and readlane instructions in the VOP3 encoding are unique because they are the only instruc...
Inst_MTBUF(InFmt_MTBUF *, const std::string &opcode)
bool isScalarRegister(int opIdx) override
Inst_MUBUF(InFmt_MUBUF *, const std::string &opcode)
int getRegisterIndex(int opIdx, GPUDynInstPtr gpuDynInst) override
bool isVectorRegister(int opIdx) override
bool isScalarRegister(int opIdx) override
void generateDisassembly() override
bool isVectorRegister(int opIdx) override
int instSize() const override
int getRegisterIndex(int opIdx, GPUDynInstPtr gpuDynInst) override
int getRegisterIndex(int opIdx, GPUDynInstPtr gpuDynInst) override
Inst_SOPP(InFmt_SOPP *, const std::string &opcode)
void generateDisassembly() override
virtual int getNumOperands()=0
bool isScalarRegister(int opIdx) override
void generateDisassembly() override
bool isScalarRegister(int opIdx) override
int getRegisterIndex(int opIdx, GPUDynInstPtr gpuDynInst) override
ScalarRegU32 _srcLiteral
if the instruction has a src literal - an immediate value that is part of the instruction stream - we...
std::string opSelectorToRegSym(int idx, int numRegs)
int instSize() const override
Bitfield< 24, 21 > opcode
int getOperandSize(int opIdx) override
int instSize() const override
bool hasSecondDword(InFmt_VOP1 *)
int getRegisterIndex(int opIdx, GPUDynInstPtr gpuDynInst) override
Inst_FLAT(InFmt_FLAT *, const std::string &opcode)
bool isVectorRegister(int opIdx) override
virtual int numSrcRegOperands()=0
bool isVectorRegister(int opIdx) override
bool hasSecondDword(InFmt_VOPC *)
int instSize() const override
bool hasSecondDword(InFmt_VOP2 *)
int instSize() const override
int instSize() const override
bool isScalarRegister(int opIdx) override
int instSize() const override
Inst_MIMG(InFmt_MIMG *, const std::string &opcode)
Inst_VOP3_SDST_ENC(InFmt_VOP3_SDST_ENC *, const std::string &opcode)
Inst_SOPC(InFmt_SOPC *, const std::string &opcode)
int getRegisterIndex(int opIdx, GPUDynInstPtr gpuDynInst) override
int getRegisterIndex(int opIdx, GPUDynInstPtr gpuDynInst) override
void generateDisassembly() override
bool isScalarRegister(int opIdx) override
InstFormat * MachInst
used to represent the encoding of a GCN3 inst.
bool isVectorRegister(int opIdx) override
bool isScalarRegister(int opIdx) override
void generateDisassembly() override