summaryrefslogtreecommitdiff
path: root/src/cuda-sim/ptx_sim.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/cuda-sim/ptx_sim.cc')
-rw-r--r--src/cuda-sim/ptx_sim.cc11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/cuda-sim/ptx_sim.cc b/src/cuda-sim/ptx_sim.cc
index 269b858..85e6185 100644
--- a/src/cuda-sim/ptx_sim.cc
+++ b/src/cuda-sim/ptx_sim.cc
@@ -241,6 +241,7 @@ ptx_thread_info::ptx_thread_info()
m_RPC_updated = false;
m_last_was_call = false;
m_enable_debug_trace = false;
+ m_local_mem_stack_pointer = 0;
}
const ptx_version &ptx_thread_info::get_ptx_version() const
@@ -447,6 +448,16 @@ void ptx_thread_info::dump_modifiedregs()
}
}
+void ptx_thread_info::push_local_mem_stack()
+{
+ m_local_mem_stack_pointer += m_func_info->local_mem_framesize();
+}
+
+void ptx_thread_info::pop_local_mem_stack()
+{
+ m_local_mem_stack_pointer -= m_func_info->local_mem_framesize();
+}
+
void ptx_thread_info::set_npc( const function_info *f )
{
m_NPC = f->get_start_PC();