#include <string>
-#include "base/misc.hh"
-#include "gpu-compute/code_enums.hh"
+#include "base/logging.hh"
#include "gpu-compute/compute_unit.hh"
#include "gpu-compute/gpu_dyn_inst.hh"
#include "gpu-compute/shader.hh"
nxtBusy.clear();
nxtBusy.resize(numRegsPerSimd, 0);
- vgprState->init(numRegsPerSimd);
+ vgprState->init(numRegsPerSimd, p->wfSize);
}
void
{
for (int i = 0; i < ii->getNumOperands(); ++i) {
if (ii->isVectorRegister(i)) {
- uint32_t vgprIdx = ii->getRegisterIndex(i);
+ uint32_t vgprIdx = ii->getRegisterIndex(i, ii);
uint32_t pVgpr = w->remap(vgprIdx, ii->getOperandSize(i), 1);
if (regBusy(pVgpr, ii->getOperandSize(i)) == 1) {
void
VectorRegisterFile::exec(GPUDynInstPtr ii, Wavefront *w)
{
- bool loadInstr = IS_OT_READ(ii->opType());
- bool atomicInstr = IS_OT_ATOMIC(ii->opType());
+ bool loadInstr = ii->isLoad();
+ bool atomicInstr = ii->isAtomic() || ii->isMemFence();
bool loadNoArgInstr = loadInstr && !ii->isArgLoad();
// iterate over all register destination operands
for (int i = 0; i < ii->getNumOperands(); ++i) {
if (ii->isVectorRegister(i) && ii->isDstOperand(i)) {
- uint32_t physReg = w->remap(ii->getRegisterIndex(i),
+ uint32_t physReg = w->remap(ii->getRegisterIndex(i, ii),
ii->getOperandSize(i), 1);
// mark the destination vector register as busy
// iterate over all register destination operands
for (int i = 0; i < ii->getNumOperands(); ++i) {
if (ii->isVectorRegister(i) && ii->isDstOperand(i)) {
- uint32_t physReg = w->remap(ii->getRegisterIndex(i),
+ uint32_t physReg = w->remap(ii->getRegisterIndex(i, ii),
ii->getOperandSize(i), 1);
// set the in-flight status of the destination vector register
preMarkReg(physReg, ii->getOperandSize(i), 1);