diff options
| author | Tor Aamodt <[email protected]> | 2010-07-20 01:08:56 -0800 |
|---|---|---|
| committer | Tor Aamodt <[email protected]> | 2010-07-20 01:08:56 -0800 |
| commit | a884b505457d48dcd2783563d407e14a607456ee (patch) | |
| tree | 4e50efd26376e2dce8c96a8b21bd57f88c74e23f /src/cuda-sim/ptx_sim.cc | |
| parent | 55106068e9087f253bbeb587a763055620e59441 (diff) | |
- adding CL_DEVICE_SINGLE_FP_CONFIG (need to get info on what it should be set to)
- bug fix for shader_core object allocation/initialization
- bug fix for ret instruction w/ OpenCL + new PTX ABI
- some formatting of output
[git-p4: depot-paths = "//depot/gpgpu_sim_research/fermi/distribution/": change = 6910]
Diffstat (limited to 'src/cuda-sim/ptx_sim.cc')
| -rw-r--r-- | src/cuda-sim/ptx_sim.cc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/cuda-sim/ptx_sim.cc b/src/cuda-sim/ptx_sim.cc index 3974408..bf7b7b6 100644 --- a/src/cuda-sim/ptx_sim.cc +++ b/src/cuda-sim/ptx_sim.cc @@ -356,6 +356,7 @@ void ptx_thread_info::callstack_push( unsigned pc, unsigned rpc, const symbol *r m_RPC = -1; m_RPC_updated = true; m_last_was_call = true; + assert( m_func_info != NULL ); m_callstack.push_back( stack_entry(m_symbol_table,m_func_info,pc,rpc,return_var_src,return_var_dst,call_uid) ); m_regs.push_back( reg_map_t() ); m_local_mem_stack_pointer += m_func_info->local_mem_framesize(); @@ -368,8 +369,6 @@ extern void set_operand_value( const symbol *dst, const ptx_reg_t &data ); bool ptx_thread_info::callstack_pop() { - assert( !m_callstack.empty() ); - assert( m_local_mem_stack_pointer >= m_callstack.back().m_func_info->local_mem_framesize() ); const symbol *rv_src = m_callstack.back().m_return_var_src; const symbol *rv_dst = m_callstack.back().m_return_var_dst; assert( !((rv_src != NULL) ^ (rv_dst != NULL)) ); // ensure caller and callee agree on whether there is a return value @@ -384,8 +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_local_mem_stack_pointer -= m_func_info->local_mem_framesize(); + } m_func_info = m_callstack.back().m_func_info; - m_local_mem_stack_pointer -= m_func_info->local_mem_framesize(); m_callstack.pop_back(); m_regs.pop_back(); |
