summaryrefslogtreecommitdiff
path: root/src/cuda-sim/ptx_sim.cc
diff options
context:
space:
mode:
authorTor Aamodt <[email protected]>2010-07-17 19:37:23 -0800
committerTor Aamodt <[email protected]>2010-07-17 19:37:23 -0800
commit7e755bb656b68cfb628fcc0424b1325c32cb5d61 (patch)
treea054761e438c5d1f27ee9f2c92e76f476bdcbe31 /src/cuda-sim/ptx_sim.cc
parent619c0c87fd18a9b34d2bbcf9eb2711bbe07b8d9a (diff)
- added *implied* local memory stack pointer for functional execution
(still need to determine framesize during parsing, and need to support alternate mode were stack pointer is explicit register a la zev...) - define local param mapping to local memory for functional execution [git-p4: depot-paths = "//depot/gpgpu_sim_research/fermi/distribution/": change = 6875]
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();