summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/cuda-sim/instructions.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/cuda-sim/instructions.cc b/src/cuda-sim/instructions.cc
index b5a3db4..b401bef 100644
--- a/src/cuda-sim/instructions.cc
+++ b/src/cuda-sim/instructions.cc
@@ -3805,7 +3805,8 @@ void sst_impl( const ptx_instruction *pI, ptx_thread_info *thread )
}
}
// store the number of nonzero elements in the array
- data.s64 = offset-1;
+ data = thread->get_operand_value(src1, dst, type, thread, 1);
+ data.s64 += 4*(offset-1);
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)