diff options
| author | sspenst <[email protected]> | 2016-07-07 12:43:10 -0700 |
|---|---|---|
| committer | sspenst <[email protected]> | 2016-07-07 12:43:10 -0700 |
| commit | e61a68f28a887fae5ed49533597349dfd074ebf9 (patch) | |
| tree | 3c199f073caaafc885b79775ac1fe7439e235ea9 /src/cuda-sim/instructions.cc | |
| parent | 19595382f05235b8887955c76794a976fad04833 (diff) | |
SST instruction now returns the end address of the new sparse array
Diffstat (limited to 'src/cuda-sim/instructions.cc')
| -rw-r--r-- | src/cuda-sim/instructions.cc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/cuda-sim/instructions.cc b/src/cuda-sim/instructions.cc index d4b74fa..9e2dfbb 100644 --- a/src/cuda-sim/instructions.cc +++ b/src/cuda-sim/instructions.cc @@ -3802,6 +3802,11 @@ void sst_impl( const ptx_instruction *pI, ptx_thread_info *thread ) } } + // store the return address + data = thread->get_operand_value(src1, dst, type, thread, 1); + data.s64 += 4*(offset-1); // set address to the last spot in the sparse array + thread->set_operand_value(dst, data, type, thread, pI); + // fill the rest of the array with zeros (dst should always have a 0 in it) while (offset < NUM_THREADS) { mem->write(addr+(offset*4),size/8,&dst_data.s64,thread,pI); @@ -3811,9 +3816,6 @@ void sst_impl( const ptx_instruction *pI, ptx_thread_info *thread ) thread->m_last_effective_address = addr+(NUM_THREADS-1)*4; thread->m_last_memory_space = space; } - - //if( type == S16_TYPE || type == S32_TYPE ) sign_extend(data,size,dst); - //thread->set_operand_value(dst,data, type, thread, pI); } void ssy_impl( const ptx_instruction *pI, ptx_thread_info *thread ) |
