summaryrefslogtreecommitdiff
path: root/src/arch
diff options
context:
space:
mode:
Diffstat (limited to 'src/arch')
-rwxr-xr-xsrc/arch/hsail/gen.py46
-rw-r--r--src/arch/x86/process.cc9
2 files changed, 53 insertions, 2 deletions
diff --git a/src/arch/hsail/gen.py b/src/arch/hsail/gen.py
index 92fc5c510..ec6ceec3d 100755
--- a/src/arch/hsail/gen.py
+++ b/src/arch/hsail/gen.py
@@ -776,6 +776,52 @@ gen('Call', base_class='SpecialInstNoSrcNoDest')
# 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
diff --git a/src/arch/x86/process.cc b/src/arch/x86/process.cc
index 66a520bc3..4b71357b0 100644
--- a/src/arch/x86/process.cc
+++ b/src/arch/x86/process.cc
@@ -73,7 +73,10 @@ static const int ArgumentReg[] = {
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,
@@ -82,7 +85,9 @@ static const int ArgumentReg32[] = {
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) :