summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorsspenst <[email protected]>2016-07-07 12:43:10 -0700
committersspenst <[email protected]>2016-07-07 12:43:10 -0700
commite61a68f28a887fae5ed49533597349dfd074ebf9 (patch)
tree3c199f073caaafc885b79775ac1fe7439e235ea9 /src
parent19595382f05235b8887955c76794a976fad04833 (diff)
SST instruction now returns the end address of the new sparse array
Diffstat (limited to 'src')
-rw-r--r--src/cuda-sim/instructions.cc8
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 )