summaryrefslogtreecommitdiff
path: root/src/cuda-sim
diff options
context:
space:
mode:
authorAhmed El-Shafiey <[email protected]>2013-03-19 03:45:06 -0800
committerAndrew Boktor <[email protected]>2014-08-14 13:50:05 -0700
commit330d2918e88419b3096fb57b58d222d5bccf2b14 (patch)
treec7bced4ca7a23b0724c89032f3e9178df4127332 /src/cuda-sim
parenta6002ba19d12eaa95482d087e45c6792fd8480fb (diff)
This should fix the NNC undefined memory locations bug. It turned out that the main problem is in the benchmark code itself.
[git-p4: depot-paths = "//depot/gpgpu_sim_research/fermi/distribution/": change = 15537]
Diffstat (limited to 'src/cuda-sim')
-rw-r--r--src/cuda-sim/ptx_ir.h6
-rw-r--r--src/cuda-sim/ptx_sim.cc1
2 files changed, 7 insertions, 0 deletions
diff --git a/src/cuda-sim/ptx_ir.h b/src/cuda-sim/ptx_ir.h
index d8ceeea..5efa3a8 100644
--- a/src/cuda-sim/ptx_ir.h
+++ b/src/cuda-sim/ptx_ir.h
@@ -167,6 +167,10 @@ public:
m_is_func_addr = false;
m_reg_num_valid = false;
m_function = NULL;
+ m_reg_num=(unsigned)-1;
+ m_arch_reg_num=(unsigned)-1;
+ m_address=(unsigned)-1;
+ m_initializer.clear();
if ( type ) m_is_shared = type->get_key().is_shared();
if ( type ) m_is_const = type->get_key().is_const();
if ( type ) m_is_global = type->get_key().is_global();
@@ -1289,6 +1293,7 @@ public:
m_is_reg=false;
m_is_param=false;
m_param_value=NULL;
+ m_reg_value=ptx_reg_t();
}
arg_buffer_t( const arg_buffer_t &another )
{
@@ -1319,6 +1324,7 @@ public:
arg_buffer_t( const symbol *dst_sym, const operand_info &src_op, ptx_reg_t source_value ) : m_src_op(src_op)
{
m_dst = dst_sym;
+ m_reg_value=ptx_reg_t();
if( dst_sym->is_reg() ) {
m_is_reg = true;
m_is_param = false;
diff --git a/src/cuda-sim/ptx_sim.cc b/src/cuda-sim/ptx_sim.cc
index 29351a0..e969e88 100644
--- a/src/cuda-sim/ptx_sim.cc
+++ b/src/cuda-sim/ptx_sim.cc
@@ -172,6 +172,7 @@ ptx_thread_info::ptx_thread_info( kernel_info_t &kernel )
m_enable_debug_trace = false;
m_local_mem_stack_pointer = 0;
m_gpu = NULL;
+ m_last_set_operand_value=ptx_reg_t();
}
const ptx_version &ptx_thread_info::get_ptx_version() const