summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJimmy Kwa <[email protected]>2010-10-28 12:19:50 -0800
committerJimmy Kwa <[email protected]>2010-10-28 12:19:50 -0800
commitd7809cae28dd28ac86555e53cb2d125656aa3ec0 (patch)
treebbd599202a5a68e50e03b1fdab53225ac06a3e19
parent0586c55d7688f492d5264cb9299cf00ff73d3df7 (diff)
fixed decuda_to_ptxplus's makefile after being moved into distribution. Moved getDecuda into distribution as well.
[git-p4: depot-paths = "//depot/gpgpu_sim_research/fermi/distribution/": change = 7943]
-rw-r--r--decuda_to_ptxplus/makefile8
-rw-r--r--getDecuda/decuda.patch37
-rwxr-xr-xgetDecuda/getDecuda.sh10
3 files changed, 51 insertions, 4 deletions
diff --git a/decuda_to_ptxplus/makefile b/decuda_to_ptxplus/makefile
index cc0a37e..9f86fe5 100644
--- a/decuda_to_ptxplus/makefile
+++ b/decuda_to_ptxplus/makefile
@@ -45,11 +45,11 @@ headerParser.o : headerParser.cpp stringList.h decudaInst.h decudaInstList.h
decuda_to_ptxplus.o : decuda_to_ptxplus.cc decudaInstList.h
g++ ${FLAGS} -c -odecuda_to_ptxplus.o decuda_to_ptxplus.cc
-lex.ptx_.c : ../distribution/src/cuda-sim/ptx.l
- flex ../distribution/src/cuda-sim/ptx.l
+lex.ptx_.c : ../src/cuda-sim/ptx.l
+ flex ../src/cuda-sim/ptx.l
-ptx.tab.c : ../distribution/src/cuda-sim/ptx.y
- bison --name-prefix=ptx_ -v -d ../distribution/src/cuda-sim/ptx.y
+ptx.tab.c : ../src/cuda-sim/ptx.y
+ bison --name-prefix=ptx_ -v -d ../src/cuda-sim/ptx.y
ptx.tab.h : ptx.tab.c
diff --git a/getDecuda/decuda.patch b/getDecuda/decuda.patch
new file mode 100644
index 0000000..eab6c50
--- /dev/null
+++ b/getDecuda/decuda.patch
@@ -0,0 +1,37 @@
+diff -crB decuda/Instruction.py decudaplus/Instruction.py
+*** decuda/Instruction.py 2010-07-24 05:28:03.000000000 -0700
+--- decudaplus/Instruction.py 2010-09-27 12:52:24.000000000 -0700
+***************
+*** 401,406 ****
+--- 401,409 ----
+ value = self.bits(0,0x001F0000)
+ else:
+ value = self.bits(0,0x007F0000)
++ if len(self.inst)==2:
++ if self.bits(1,0x00200000):
++ t_offset = 0
+
+ if opt_imm and self.fullinst and self.bits(1,0x00100000):
+ # Operand 3 is immediate
+diff -crB decuda/Operand.py decudaplus/Operand.py
+*** decuda/Operand.py 2010-07-24 05:28:03.000000000 -0700
+--- decudaplus/Operand.py 2010-09-27 12:52:24.000000000 -0700
+***************
+*** 176,183 ****
+ rv.write(("0x%06x") % value)
+ elif self.offset != None:
+ rv.write(("%s[$ofs%i%s%s0x%0"+width+"x]") % (_indir[self.indirection], self.offset, _ofs_inc[self.offset_inc], times, value))
+! elif self.indirection == OP_INDIRECTION_SHARED and self.size==16 and value in _param_space:
+! rv.write(_param_space[value])
+ elif self.indirection == OP_INDIRECTION_INTERNAL and value in _ldgpu_ops:
+ rv.write(_ldgpu_ops[value])
+ else:
+--- 176,183 ----
+ rv.write(("0x%06x") % value)
+ elif self.offset != None:
+ rv.write(("%s[$ofs%i%s%s0x%0"+width+"x]") % (_indir[self.indirection], self.offset, _ofs_inc[self.offset_inc], times, value))
+! elif self.indirection == OP_INDIRECTION_SHARED and self.size==16 and value/2 in _param_space:
+! rv.write(_param_space[value/2])
+ elif self.indirection == OP_INDIRECTION_INTERNAL and value in _ldgpu_ops:
+ rv.write(_ldgpu_ops[value])
+ else:
diff --git a/getDecuda/getDecuda.sh b/getDecuda/getDecuda.sh
new file mode 100755
index 0000000..a4a7db9
--- /dev/null
+++ b/getDecuda/getDecuda.sh
@@ -0,0 +1,10 @@
+# This script downloads the latest version of decuda from http://github.com/laanwj/decuda, untars it and patches it.
+# Currently hardcoded to work with only decuda 0.4.2.
+
+# decuda.patch must be in the same folder as getDecuda.sh
+
+wget -q http://github.com/laanwj/decuda/tarball/master
+tar -xf ./laanwj-decuda-c30bd17.tar.gz
+mv laanwj-decuda-c30bd17 ../decuda
+patch -s -d ../decuda < ./decuda.patch
+rm ./laanwj-decuda-c30bd17.tar.gz