summaryrefslogtreecommitdiff
path: root/src/cuda-sim/ptx_sim.cc
diff options
context:
space:
mode:
authorTor Aamodt <[email protected]>2010-07-30 09:27:15 -0800
committerTor Aamodt <[email protected]>2010-07-30 09:27:15 -0800
commita5fb09084b9783b3fb86ca42bd6a12800361ff85 (patch)
tree9cbdb7d2b546c89a9b5758153abad748bfbdab33 /src/cuda-sim/ptx_sim.cc
parenta7a547c1b6d1b8f96bb1573eda8b2114db66389e (diff)
fix stack pointer update on return
[git-p4: depot-paths = "//depot/gpgpu_sim_research/fermi/distribution/": change = 7113]
Diffstat (limited to 'src/cuda-sim/ptx_sim.cc')
-rw-r--r--src/cuda-sim/ptx_sim.cc6
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();