36 #ifndef __GPU_DYN_INST_HH__ 37 #define __GPU_DYN_INST_HH__ 44 #include "enums/MemType.hh" 45 #include "enums/StorageClassType.hh" 61 : c(_c), s(_s), computeUnit(compute_unit) { }
94 int numSrcRegOperands();
95 int numDstRegOperands();
97 bool isVectorRegister(
int operandIdx);
98 bool isScalarRegister(
int operandIdx);
99 bool isCondRegister(
int operandIdx);
100 int getRegisterIndex(
int operandIdx,
GPUDynInstPtr gpuDynInst);
101 int getOperandSize(
int operandIdx);
102 bool isDstOperand(
int operandIdx);
103 bool isSrcOperand(
int operandIdx);
105 const std::string &disassemble()
const;
107 uint64_t seqNum()
const;
109 Enums::StorageClassType executedAs();
174 bool isBranch()
const;
176 bool isReturn()
const;
177 bool isUnconditionalJump()
const;
178 bool isSpecialOp()
const;
179 bool isWaitcnt()
const;
181 bool isBarrier()
const;
182 bool isMemFence()
const;
183 bool isMemRef()
const;
186 bool isStore()
const;
188 bool isAtomic()
const;
189 bool isAtomicNoRet()
const;
190 bool isAtomicRet()
const;
192 bool isScalar()
const;
193 bool readsSCC()
const;
194 bool writesSCC()
const;
195 bool readsVCC()
const;
196 bool writesVCC()
const;
198 bool isAtomicAnd()
const;
199 bool isAtomicOr()
const;
200 bool isAtomicXor()
const;
201 bool isAtomicCAS()
const;
202 bool isAtomicExch()
const;
203 bool isAtomicAdd()
const;
204 bool isAtomicSub()
const;
205 bool isAtomicInc()
const;
206 bool isAtomicDec()
const;
207 bool isAtomicMax()
const;
208 bool isAtomicMin()
const;
210 bool isArgLoad()
const;
211 bool isGlobalMem()
const;
212 bool isLocalMem()
const;
214 bool isArgSeg()
const;
215 bool isGlobalSeg()
const;
216 bool isGroupSeg()
const;
217 bool isKernArgSeg()
const;
218 bool isPrivateSeg()
const;
219 bool isReadOnlySeg()
const;
220 bool isSpillSeg()
const;
222 bool isWorkitemScope()
const;
223 bool isWavefrontScope()
const;
224 bool isWorkgroupScope()
const;
225 bool isDeviceScope()
const;
226 bool isSystemScope()
const;
227 bool isNoScope()
const;
229 bool isRelaxedOrder()
const;
230 bool isAcquire()
const;
231 bool isRelease()
const;
232 bool isAcquireRelease()
const;
233 bool isNoOrder()
const;
235 bool isGloballyCoherent()
const;
236 bool isSystemCoherent()
const;
261 }
else if (isAtomicOr()) {
263 }
else if (isAtomicXor()) {
265 }
else if (isAtomicCAS()) {
267 }
else if (isAtomicExch()) {
269 }
else if (isAtomicAdd()) {
271 }
else if (isAtomicSub()) {
273 }
else if (isAtomicInc()) {
275 }
else if (isAtomicDec()) {
277 }
else if (isAtomicMax()) {
279 }
else if (isAtomicMin()) {
282 fatal(
"Unrecognized atomic operation");
290 if (isPrivateSeg()) {
292 }
else if (isSpillSeg()) {
294 }
else if (isGlobalSeg()) {
296 }
else if (isReadOnlySeg()) {
298 }
else if (isGroupSeg()) {
300 }
else if (isFlat()) {
301 panic(
"TODO: translate to correct scope");
303 fatal(
"%s has bad segment type\n", disassemble());
306 if (isWavefrontScope()) {
309 }
else if (isWorkgroupScope()) {
312 }
else if (isDeviceScope()) {
315 }
else if (isSystemScope()) {
318 }
else if (!isNoScope() && !isWorkitemScope()) {
319 fatal(
"%s has bad scope type\n", disassemble());
326 }
else if (isRelease()) {
328 }
else if (isAcquireRelease()) {
330 }
else if (!isNoOrder()) {
331 fatal(
"%s has bad memory order\n", disassemble());
340 }
else if (isAtomicNoRet()) {
361 #endif // __GPU_DYN_INST_HH__
#define panic(...)
This implements a cprintf based panic() function.
StatusVector memStatusVector
#define fatal(...)
This implements a cprintf based fatal() function.
std::vector< int > tlbHitLevel
std::map< unsigned, waveQueue > xactCasLoadMap
AtomicOpFunctor * makeAtomicOpFunctor(c0 *reg0, c0 *reg1)
std::function< void(GPUStaticInst *, GPUDynInstPtr)> execContinuation
std::shared_ptr< Request > RequestPtr
std::bitset< std::numeric_limits< unsigned long long >::digits > VectorMask
ComputeUnit * computeUnit
Access has Wavefront scope visibility.
The request is an atomic that does not return data.
std::vector< int > statusVector
The request is an atomic that returns data.
AtomicOpCAS(T _c, T _s, ComputeUnit *compute_unit)
std::shared_ptr< GPUDynInst > GPUDynInstPtr
void setRequestFlags(RequestPtr req, bool setMemOrder=true)
Access has Workgroup scope visibility.
Has a synchronization scope been set?
Access has System (e.g., CPU + GPU) scope visibility.
uint64_t Tick
Tick count type.
GPUStaticInst * staticInstruction()
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
The request should be marked with RELEASE.
AtomicOpFunctor * clone()
GPUStaticInst * _staticInst
Stats::Scalar numFailedCASOps
VectorMask statusBitVector
std::unordered_map< Addr, std::vector< int > > StatusVector
Access has Device (e.g., GPU) scope visibility.
The request should be marked with ACQUIRE.