summaryrefslogtreecommitdiff
path: root/src/cuda-sim/instructions.cc
diff options
context:
space:
mode:
authorspeverel <[email protected]>2016-06-16 15:51:17 -0700
committerspeverel <[email protected]>2016-06-16 15:51:17 -0700
commit281798191f9bc37a75592d34a5e38cc5d6c41b6d (patch)
treefa75554da6e1f8f15c20a233d8ef1e56911ea374 /src/cuda-sim/instructions.cc
parent547ce656018a6439e658be3c283721a961b0217f (diff)
Added the ability to inject arbitrary PTX instructions. This will be used to add custom instructions in the future; the imaginary instructions 'spr' and 'ama' have been added as samples.
Diffstat (limited to 'src/cuda-sim/instructions.cc')
-rw-r--r--src/cuda-sim/instructions.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/cuda-sim/instructions.cc b/src/cuda-sim/instructions.cc
index 02ce01c..922e14a 100644
--- a/src/cuda-sim/instructions.cc
+++ b/src/cuda-sim/instructions.cc
@@ -816,6 +816,11 @@ void add_impl( const ptx_instruction *pI, ptx_thread_info *thread )
void addc_impl( const ptx_instruction *pI, ptx_thread_info *thread ) { inst_not_implemented(pI); }
+void ama_impl( const ptx_instruction *pI, ptx_thread_info *thread )
+{
+ printf("AMA instruction found.\n");
+}
+
void and_impl( const ptx_instruction *pI, ptx_thread_info *thread )
{
ptx_reg_t src1_data, src2_data, data;
@@ -3698,6 +3703,11 @@ void slct_impl( const ptx_instruction *pI, ptx_thread_info *thread )
thread->set_operand_value(dst,d, i_type, thread, pI);
}
+void spr_impl( const ptx_instruction *pI, ptx_thread_info *thread )
+{
+ printf("SPR instruction found.\n");
+}
+
void sqrt_impl( const ptx_instruction *pI, ptx_thread_info *thread )
{
ptx_reg_t a, d;