# Generate file epilogs
#
###############
+header_code('''
+template<>
+inline void
+Abs<U32>::execute(GPUDynInstPtr gpuDynInst)
+{
+ Wavefront *w = gpuDynInst->wavefront();
+
+ const VectorMask &mask = w->getPred();
+
+ for (int lane = 0; lane < w->computeUnit->wfSize(); ++lane) {
+ if (mask[lane]) {
+ CType dest_val;
+ CType src_val;
+
+ src_val = this->src[0].template get<CType>(w, lane);
+
+ dest_val = (CType)(src_val);
+
+ this->dest.set(w, lane, dest_val);
+ }
+ }
+}
+
+template<>
+inline void
+Abs<U64>::execute(GPUDynInstPtr gpuDynInst)
+{
+ Wavefront *w = gpuDynInst->wavefront();
+
+ const VectorMask &mask = w->getPred();
+
+ for (int lane = 0; lane < w->computeUnit->wfSize(); ++lane) {
+ if (mask[lane]) {
+ CType dest_val;
+ CType src_val;
+
+ src_val = this->src[0].template get<CType>(w, lane);
+
+ dest_val = (CType)(src_val);
+
+ this->dest.set(w, lane, dest_val);
+ }
+ }
+}
+''')
+
header_code.dedent()
header_code('''
} // namespace HsailISA
INTREG_R8W,
INTREG_R9W
};
-static const int NumArgumentRegs = sizeof(ArgumentReg) / sizeof(const int);
+
+static const int NumArgumentRegs M5_VAR_USED =
+ sizeof(ArgumentReg) / sizeof(const int);
+
static const int ArgumentReg32[] = {
INTREG_EBX,
INTREG_ECX,
INTREG_EDI,
INTREG_EBP
};
-static const int NumArgumentRegs32 = sizeof(ArgumentReg) / sizeof(const int);
+
+static const int NumArgumentRegs32 M5_VAR_USED =
+ sizeof(ArgumentReg) / sizeof(const int);
X86LiveProcess::X86LiveProcess(LiveProcessParams * params, ObjectFile *objFile,
SyscallDesc *_syscallDescs, int _numSyscallDescs) :
void setFlag(Flags flag) { _flags[flag] = true; }
- protected:
virtual void
execLdAcq(GPUDynInstPtr gpuDynInst)
{
fatal("calling execAtomicAcq() on a non-atomic instruction.\n");
}
+ protected:
const std::string opcode;
std::string disassembly;
int _instNum;
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));
}
}
{
// make sure all the hash-maps are empty
assert(translationReturnEvent.empty());
-
- // delete the TLB
- delete[] tlb;
}
BaseSlavePort&
*/
bool accessDistance;
- GpuTlbEntry *tlb;
+ std::vector<GpuTlbEntry> tlb;
/*
* It's a per-set list. As long as we have not reached
#include <typeinfo>
#include "base/compiler.hh"
+#include "mem/ruby/common/BoolVec.hh"
#include "base/cprintf.hh"
''')