From 64b193e80f4bc14edb0dd685f6c26c53a0a339c3 Mon Sep 17 00:00:00 2001 From: "Andrew M. B. Boktor" Date: Sun, 13 May 2012 14:13:13 -0800 Subject: No need to write pid in r0 if kernel doesn't use r0 (causes failure) [git-p4: depot-paths = "//depot/gpgpu_sim_research/fermi/distribution/": change = 12518] --- src/cuda-sim/ptx_sim.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/cuda-sim/ptx_sim.cc b/src/cuda-sim/ptx_sim.cc index 8053949..59479c8 100644 --- a/src/cuda-sim/ptx_sim.cc +++ b/src/cuda-sim/ptx_sim.cc @@ -262,7 +262,10 @@ void ptx_thread_info::cpy_tid_to_reg( dim3 tid ) data.u32=(tid.x + (tid.y<<16) + (tid.z<<26)); const symbol *r0 = m_symbol_table->lookup("$r0"); - set_reg(r0,data); + if (r0){ + //No need to set pid if kernel doesn't use it + set_reg(r0,data); + } } void ptx_thread_info::print_insn( unsigned pc, FILE * fp ) const -- cgit v1.3