summaryrefslogtreecommitdiff
path: root/src/cuda-sim/ptx_ir.cc
diff options
context:
space:
mode:
authorTor Aamodt <[email protected]>2010-10-22 14:22:21 -0800
committerTor Aamodt <[email protected]>2010-10-22 14:22:21 -0800
commit4da926e61569a069bac229e8ba649e600fc78a04 (patch)
treecdb7fb44f15cf844c587bf2c92b37d3d2412c152 /src/cuda-sim/ptx_ir.cc
parentdc93f319051a9a9936a02cd9c1f7843a382a2da0 (diff)
enables global loads/stores for ptxplus
passing CUDA 3.1 and ptxplus correlation correlation back to around 0.89 on ptxplus vs quadro fx5800 [git-p4: depot-paths = "//depot/gpgpu_sim_research/fermi/distribution/": change = 7898]
Diffstat (limited to 'src/cuda-sim/ptx_ir.cc')
-rw-r--r--src/cuda-sim/ptx_ir.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/cuda-sim/ptx_ir.cc b/src/cuda-sim/ptx_ir.cc
index 5def6db..fee0056 100644
--- a/src/cuda-sim/ptx_ir.cc
+++ b/src/cuda-sim/ptx_ir.cc
@@ -1143,7 +1143,15 @@ ptx_instruction::ptx_instruction( int opcode,
m_space_spec = space_spec;
if( ( opcode == ST_OP || opcode == LD_OP ) && (space_spec == undefined_space) ) {
m_space_spec = generic_space;
+ }
+ for( std::vector<operand_info>::const_iterator i=m_operands.begin(); i!=m_operands.end(); ++i) {
+ const operand_info &op = *i;
+ if( op.get_addr_space() != undefined_space )
+ m_space_spec = op.get_addr_space(); // TODO: can have more than one memory space for ptxplus (g8x) inst
}
+ if( opcode == TEX_OP )
+ m_space_spec = tex_space;
+
m_source_file = file?file:"<unknown>";
m_source_line = line;
m_source = source;