From a5fb09084b9783b3fb86ca42bd6a12800361ff85 Mon Sep 17 00:00:00 2001 From: Tor Aamodt Date: Fri, 30 Jul 2010 09:27:15 -0800 Subject: fix stack pointer update on return [git-p4: depot-paths = "//depot/gpgpu_sim_research/fermi/distribution/": change = 7113] --- src/cuda-sim/ptx_sim.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (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 bf7b7b6..d7fa510 100644 --- a/src/cuda-sim/ptx_sim.cc +++ b/src/cuda-sim/ptx_sim.cc @@ -383,11 +383,11 @@ bool ptx_thread_info::callstack_pop() m_RPC_updated = true; m_last_was_call = false; m_RPC = m_callstack.back().m_RPC; - if( m_callstack.back().m_func_info ) { - assert( m_local_mem_stack_pointer >= m_callstack.back().m_func_info->local_mem_framesize() ); + m_func_info = m_callstack.back().m_func_info; + if( m_func_info ) { + assert( m_local_mem_stack_pointer >= m_func_info->local_mem_framesize() ); m_local_mem_stack_pointer -= m_func_info->local_mem_framesize(); } - m_func_info = m_callstack.back().m_func_info; m_callstack.pop_back(); m_regs.pop_back(); -- cgit v1.3