diff options
| author | Andrew M. B. Boktor <[email protected]> | 2012-05-13 14:13:13 -0800 |
|---|---|---|
| committer | Andrew Boktor <[email protected]> | 2014-08-14 13:47:30 -0700 |
| commit | 64b193e80f4bc14edb0dd685f6c26c53a0a339c3 (patch) | |
| tree | 9b4cc8b4397d40bf3c86943a406fd139ee2e05eb /src/cuda-sim/ptx_sim.cc | |
| parent | 62e8583cd07f71a6a1df519def280eaf2fff5c12 (diff) | |
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]
Diffstat (limited to 'src/cuda-sim/ptx_sim.cc')
| -rw-r--r-- | src/cuda-sim/ptx_sim.cc | 5 |
1 files changed, 4 insertions, 1 deletions
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 |
