From 7e755bb656b68cfb628fcc0424b1325c32cb5d61 Mon Sep 17 00:00:00 2001 From: Tor Aamodt Date: Sat, 17 Jul 2010 19:37:23 -0800 Subject: - 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] --- src/cuda-sim/ptx_sim.cc | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/cuda-sim/ptx_sim.cc') 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(); -- cgit v1.3