summaryrefslogtreecommitdiff
path: root/src/cuda-sim
diff options
context:
space:
mode:
Diffstat (limited to 'src/cuda-sim')
-rw-r--r--src/cuda-sim/cuda-sim.cc2
-rw-r--r--src/cuda-sim/instructions.cc8
2 files changed, 3 insertions, 7 deletions
diff --git a/src/cuda-sim/cuda-sim.cc b/src/cuda-sim/cuda-sim.cc
index 752985c..e08e521 100644
--- a/src/cuda-sim/cuda-sim.cc
+++ b/src/cuda-sim/cuda-sim.cc
@@ -1609,7 +1609,7 @@ void functionalCoreSim::initializeCTA()
//get threads for a cta
for(unsigned i=0; i<m_kernel->threads_per_cta();i++) {
- ptx_sim_init_thread(*m_kernel,&m_thread[i],0,i,m_kernel->threads_per_cta()-i,m_kernel->threads_per_cta(),NULL,0,i/m_maxWarpSize,(gpgpu_t*)m_gpu, true);
+ ptx_sim_init_thread(*m_kernel,&m_thread[i],0,i,m_kernel->threads_per_cta()-i,m_kernel->threads_per_cta(),this,0,i/m_maxWarpSize,(gpgpu_t*)m_gpu, true);
assert(m_thread[i]!=NULL && !m_thread[i]->is_done());
ctaLiveThreads++;
}
diff --git a/src/cuda-sim/instructions.cc b/src/cuda-sim/instructions.cc
index 37e5d00..6976ba0 100644
--- a/src/cuda-sim/instructions.cc
+++ b/src/cuda-sim/instructions.cc
@@ -1258,12 +1258,10 @@ void call_impl( const ptx_instruction *pI, ptx_thread_info *thread )
return_var_src = target_func->get_return_var();
}
- unsigned sid = thread->get_hw_sid();
- unsigned tid = thread->get_hw_tid();
gpgpu_sim *gpu = thread->get_gpu();
unsigned callee_pc=0, callee_rpc=0;
if( gpu->simd_model() == POST_DOMINATOR ) {
- gpu->get_pdom_stack_top_info(sid,tid,&callee_pc,&callee_rpc);
+ thread->get_core()->get_pdom_stack_top_info(thread->get_hw_wid(),&callee_pc,&callee_rpc);
assert( callee_pc == thread->get_pc() );
}
@@ -1286,12 +1284,10 @@ void callp_impl( const ptx_instruction *pI, ptx_thread_info *thread )
const symbol *return_var_src = NULL;
const symbol *return_var_dst = NULL;
- unsigned sid = thread->get_hw_sid();
- unsigned tid = thread->get_hw_tid();
gpgpu_sim *gpu = thread->get_gpu();
unsigned callee_pc=0, callee_rpc=0;
if( gpu->simd_model() == POST_DOMINATOR ) {
- gpu->get_pdom_stack_top_info(sid,tid,&callee_pc,&callee_rpc);
+ thread->get_core()->get_pdom_stack_top_info(thread->get_hw_wid(),&callee_pc,&callee_rpc);
assert( callee_pc == thread->get_pc() );
}