gpu-compute: add gpu_isa.hh to switch hdrs, add GPUISA to WF
[gem5.git] / src / gpu-compute / wavefront.cc
index 99ac24900521d9b29df167537ee9e574f006fa10..cce76044f904dee927cc174892614e4882e08e9e 100644 (file)
@@ -49,7 +49,7 @@ WavefrontParams::create()
 }
 
 Wavefront::Wavefront(const Params *p)
-  : SimObject(p), callArgMem(nullptr)
+  : SimObject(p), callArgMem(nullptr), _gpuISA(*this)
 {
     lastTrace = 0;
     simdId = p->simdId;
@@ -670,7 +670,7 @@ Wavefront::exec()
                                      computeUnit->lastExecCycle[simdId]);
     computeUnit->lastExecCycle[simdId] = computeUnit->totalCycles.value();
     if (pc() == old_pc) {
-        uint32_t new_pc = old_pc + 1;
+        uint32_t new_pc = _gpuISA.advancePC(old_pc, ii);
         // PC not modified by instruction, proceed to next or pop frame
         pc(new_pc);
         if (new_pc == rpc()) {