diff options
| author | Wilson Fung <[email protected]> | 2013-03-19 11:22:52 -0800 |
|---|---|---|
| committer | Andrew Boktor <[email protected]> | 2014-08-14 13:50:05 -0700 |
| commit | 8525c81b63d7e2e925233acc642127b9e67fd966 (patch) | |
| tree | c3d65d0a99494bcd02a2433d0e872d0f35bdf6a8 | |
| parent | 330d2918e88419b3096fb57b58d222d5bccf2b14 (diff) | |
Integrate mov.pred fix from TM branch.
[git-p4: depot-paths = "//depot/gpgpu_sim_research/fermi/distribution/": change = 15538]
| -rw-r--r-- | CHANGES | 2 | ||||
| -rw-r--r-- | src/cuda-sim/instructions.cc | 8 |
2 files changed, 10 insertions, 0 deletions
@@ -67,6 +67,8 @@ Version 3.2.0+edits (development branch) versus 3.2.0 GPGPUSIM_ROOT was not the first entry in the list;. - Fixed a GPUWattch bug where the performance counters were not being correctly reset when a kernel completes. + - Fixed implementation for mov.pred with literal input (need to explicitly + treat zero as false and non-zero as true). Version 3.2.0 versus 3.1.2 - Added GPUWattch GPGPU power model based on McPAT 0.8beta. diff --git a/src/cuda-sim/instructions.cc b/src/cuda-sim/instructions.cc index 49b27d2..89212f2 100644 --- a/src/cuda-sim/instructions.cc +++ b/src/cuda-sim/instructions.cc @@ -2574,6 +2574,14 @@ void mov_impl( const ptx_instruction *pI, ptx_thread_info *thread ) } else { thread->set_operand_value(dst,tmp_bits, i_type, thread, pI); } + } else if (i_type == PRED_TYPE and src1.is_literal() == true) { + // in ptx, literal input translate to predicate as 0 = false and 1 = true + // we have adopted the opposite to simplify implementation of zero flags in ptxplus + data = thread->get_operand_value(src1, dst, i_type, thread, 1); + + ptx_reg_t finaldata; + finaldata.pred = (data.u32 == 0)? 1 : 0; // setting zero-flag in predicate + thread->set_operand_value(dst, finaldata, i_type, thread, pI); } else { data = thread->get_operand_value(src1, dst, i_type, thread, 1); |
