From 748a2d560b0032049e12ec57e8000941ff3e589a Mon Sep 17 00:00:00 2001 From: Tor Aamodt Date: Fri, 16 Jul 2010 12:47:47 -0800 Subject: - BlackScholes passing on CUDA 3.1 - Added fma operation by simply calling mad, however in reality fma is supposed to be more accurate than mad. For now, properly emulating fma (to get the extra precision) isn't a priority. [git-p4: depot-paths = "//depot/gpgpu_sim_research/fermi/distribution/": change = 6839] --- src/cuda-sim/instructions.cc | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/cuda-sim/instructions.cc') diff --git a/src/cuda-sim/instructions.cc b/src/cuda-sim/instructions.cc index 4479cbe..226e965 100644 --- a/src/cuda-sim/instructions.cc +++ b/src/cuda-sim/instructions.cc @@ -1386,6 +1386,13 @@ void exit_impl( const ptx_instruction *pI, ptx_thread_info *thread ) thread->set_done(); } +void mad_def( const ptx_instruction *pI, ptx_thread_info *thread ); + +void fma_impl( const ptx_instruction *pI, ptx_thread_info *thread ) +{ + mad_def(pI,thread); +} + void ld_impl( const ptx_instruction *pI, ptx_thread_info *thread ) { const operand_info &dst = pI->dst(); @@ -1502,6 +1509,11 @@ void mad24_impl( const ptx_instruction *pI, ptx_thread_info *thread ) } void mad_impl( const ptx_instruction *pI, ptx_thread_info *thread ) +{ + mad_def(pI,thread); +} + +void mad_def( const ptx_instruction *pI, ptx_thread_info *thread ) { const operand_info &dst = pI->dst(); const operand_info &src1 = pI->src1(); -- cgit v1.3