34#include "debug/GPUInst.hh"
40 : executed_as(enums::SC_NONE), _opcode(
opcode),
41 _instNum(0), _instAddr(0), srcVecDWords(-1), dstVecDWords(-1),
42 srcScalarDWords(-1), dstScalarDWords(-1), maxOpSize(-1)
67 int num_dwords =
op.sizeInDWords();
71 for (
int i = 0;
i < num_dwords;
i++) {
79 virt_idxs.push_back(virt_idx +
i);
80 phys_idxs.push_back(phys_idx);
82 DPRINTF(GPUInst,
"%s adding %s %s (%d->%d) operand that uses "
87 "src" :
"dst", virt_idxs[0], phys_idxs[0], num_dwords);
89 op.setVirtToPhysMapping(virt_idxs, phys_idxs);
91 opVec.emplace_back(
op);
97 for (
auto& srcOp :
srcOps) {
98 if (srcOp.isVectorReg()) {
101 }
else if (srcOp.isScalarReg()) {
107 for (
auto& dstOp :
dstOps) {
108 if (dstOp.isVectorReg()) {
111 }
else if (dstOp.isScalarReg()) {
139 for (
const auto& srcOp :
srcOps)
140 if (srcOp.isVectorReg())
155 for (
const auto& dstOp :
dstOps)
156 if (dstOp.isVectorReg())
182 for (
const auto& srcOp :
srcOps)
183 if (srcOp.isScalarReg())
197 for (
const auto& dstOp :
dstOps)
198 if (dstOp.isScalarReg())
212 for (
const auto& dstOp :
dstOps)
216 for (
const auto& srcOp :
srcOps)
RegisterManager * registerManager
std::vector< OperandInfo > srcOps
const std::string & disassemble()
std::vector< OperandInfo > dstScalarRegOps
virtual void generateDisassembly()=0
GPUStaticInst(const std::string &opcode)
std::vector< OperandInfo > dstVecRegOps
std::vector< OperandInfo > dstOps
std::vector< OperandInfo > srcVecRegOps
int numDstScalarOperands()
int numSrcScalarOperands()
void generateVirtToPhysMap(Wavefront *wf, ComputeUnit *cu, OperandInfo &op, std::vector< OperandInfo > &opVec, OpType opType)
std::vector< OperandInfo > srcScalarRegOps
void initDynOperandInfo(Wavefront *wf, ComputeUnit *cu)
int mapVgpr(Wavefront *w, int vgprIndex)
int mapSgpr(Wavefront *w, int sgprIndex)
Bitfield< 24, 21 > opcode
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.