From e61a68f28a887fae5ed49533597349dfd074ebf9 Mon Sep 17 00:00:00 2001 From: sspenst Date: Thu, 7 Jul 2016 12:43:10 -0700 Subject: SST instruction now returns the end address of the new sparse array --- src/cuda-sim/instructions.cc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/cuda-sim/instructions.cc') 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 ) -- cgit v1.3