summaryrefslogtreecommitdiff
path: root/src/gpu-compute
diff options
context:
space:
mode:
Diffstat (limited to 'src/gpu-compute')
-rw-r--r--src/gpu-compute/gpu_static_inst.hh2
-rw-r--r--src/gpu-compute/gpu_tlb.cc10
-rw-r--r--src/gpu-compute/gpu_tlb.hh2
3 files changed, 5 insertions, 9 deletions
diff --git a/src/gpu-compute/gpu_static_inst.hh b/src/gpu-compute/gpu_static_inst.hh
index e851c52e6..372eee8df 100644
--- a/src/gpu-compute/gpu_static_inst.hh
+++ b/src/gpu-compute/gpu_static_inst.hh
@@ -221,7 +221,6 @@ class GPUStaticInst : public GPUStaticInstFlags
void setFlag(Flags flag) { _flags[flag] = true; }
- protected:
virtual void
execLdAcq(GPUDynInstPtr gpuDynInst)
{
@@ -246,6 +245,7 @@ class GPUStaticInst : public GPUStaticInstFlags
fatal("calling execAtomicAcq() on a non-atomic instruction.\n");
}
+ protected:
const std::string opcode;
std::string disassembly;
int _instNum;
diff --git a/src/gpu-compute/gpu_tlb.cc b/src/gpu-compute/gpu_tlb.cc
index 2021af9a9..1f1a4cc61 100644
--- a/src/gpu-compute/gpu_tlb.cc
+++ b/src/gpu-compute/gpu_tlb.cc
@@ -71,16 +71,15 @@ namespace X86ISA
accessDistance = p->accessDistance;
clock = p->clk_domain->clockPeriod();
- tlb = new GpuTlbEntry[size];
- std::memset(tlb, 0, sizeof(GpuTlbEntry) * size);
+ tlb.assign(size, GpuTlbEntry());
freeList.resize(numSets);
entryList.resize(numSets);
for (int set = 0; set < numSets; ++set) {
for (int way = 0; way < assoc; ++way) {
- int x = set*assoc + way;
- freeList[set].push_back(&tlb[x]);
+ int x = set * assoc + way;
+ freeList[set].push_back(&tlb.at(x));
}
}
@@ -133,9 +132,6 @@ namespace X86ISA
{
// make sure all the hash-maps are empty
assert(translationReturnEvent.empty());
-
- // delete the TLB
- delete[] tlb;
}
BaseSlavePort&
diff --git a/src/gpu-compute/gpu_tlb.hh b/src/gpu-compute/gpu_tlb.hh
index 3549c598b..9c1a7b326 100644
--- a/src/gpu-compute/gpu_tlb.hh
+++ b/src/gpu-compute/gpu_tlb.hh
@@ -170,7 +170,7 @@ namespace X86ISA
*/
bool accessDistance;
- GpuTlbEntry *tlb;
+ std::vector<GpuTlbEntry> tlb;
/*
* It's a per-set list. As long as we have not reached