diff options
| author | Tor Aamodt <[email protected]> | 2010-10-05 13:34:47 -0800 |
|---|---|---|
| committer | Tor Aamodt <[email protected]> | 2010-10-05 13:34:47 -0800 |
| commit | e0f1b4359832ba2952ddcff3a400cd7e1e3d02b5 (patch) | |
| tree | 12f3dbd8366e15b4a9a299b0368df6fafea11847 /src/cuda-sim/instructions.cc | |
| parent | d859e08188eb5863888a9b018cf4aec6d0419c40 (diff) | |
broken change list: builds, but does not run, yet
refactoring: create warp_inst_t that provides notion of a group of scalar instructions
traveling down the pipeline.
delete DWF
delete MIMD
delete warp_tracker
delete old writeback stage, replace it with a stub that just writes back everything
delete old pipeline model
current status: MSHR's need to change to deal with the new structure
[git-p4: depot-paths = "//depot/gpgpu_sim_research/fermi/distribution/": change = 7814]
Diffstat (limited to 'src/cuda-sim/instructions.cc')
| -rw-r--r-- | src/cuda-sim/instructions.cc | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/cuda-sim/instructions.cc b/src/cuda-sim/instructions.cc index 78996bb..23d6cc8 100644 --- a/src/cuda-sim/instructions.cc +++ b/src/cuda-sim/instructions.cc @@ -831,10 +831,9 @@ void andn_impl( const ptx_instruction *pI, ptx_thread_info *thread ) thread->set_operand_value(dst,data, i_type, thread, pI); } -void atom_callback( void* ptx_inst, void* thd ) +void atom_callback( const inst_t* inst, ptx_thread_info* thread ) { - ptx_thread_info *thread = (ptx_thread_info*)thd; - ptx_instruction *pI = (ptx_instruction*)ptx_inst; + const ptx_instruction *pI = dynamic_cast<const ptx_instruction*>(inst); // Check state space assert( pI->get_space()==global_space ); @@ -1112,7 +1111,7 @@ void atom_impl( const ptx_instruction *pI, ptx_thread_info *thread ) thread->m_last_effective_address = src1_data.u32; thread->m_last_memory_space = space; thread->m_last_dram_callback.function = atom_callback; - thread->m_last_dram_callback.instruction = (void*)pI; + thread->m_last_dram_callback.instruction = pI; } void bar_sync_impl( const ptx_instruction *pI, ptx_thread_info *thread ) @@ -3787,8 +3786,6 @@ void vshl_impl( const ptx_instruction *pI, ptx_thread_info *thread ) { inst_not_ void vshr_impl( const ptx_instruction *pI, ptx_thread_info *thread ) { inst_not_implemented(pI); } void vsub_impl( const ptx_instruction *pI, ptx_thread_info *thread ) { inst_not_implemented(pI); } -extern unsigned g_warp_active_mask; - void vote_impl( const ptx_instruction *pI, ptx_thread_info *thread ) { static bool first_in_warp = true; @@ -3804,7 +3801,7 @@ void vote_impl( const ptx_instruction *pI, ptx_thread_info *thread ) or_all = false; unsigned mask=0x80000000; unsigned offset=31; - while( mask && ((mask & g_warp_active_mask)==0) ) { + while( mask && !pI->active(mask) ) { mask = mask>>1; offset--; } |
