diff options
| author | Tor Aamodt <[email protected]> | 2010-07-30 09:27:15 -0800 |
|---|---|---|
| committer | Tor Aamodt <[email protected]> | 2010-07-30 09:27:15 -0800 |
| commit | a5fb09084b9783b3fb86ca42bd6a12800361ff85 (patch) | |
| tree | 9cbdb7d2b546c89a9b5758153abad748bfbdab33 | |
| parent | a7a547c1b6d1b8f96bb1573eda8b2114db66389e (diff) | |
fix stack pointer update on return
[git-p4: depot-paths = "//depot/gpgpu_sim_research/fermi/distribution/": change = 7113]
| -rw-r--r-- | src/cuda-sim/ptx_sim.cc | 6 |
1 files changed, 3 insertions, 3 deletions
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(); |
