diff options
| author | Tor Aamodt <[email protected]> | 2010-10-24 13:05:48 -0800 |
|---|---|---|
| committer | Tor Aamodt <[email protected]> | 2010-10-24 13:05:48 -0800 |
| commit | 826a0dc10ca939af1f2c24d0d2e63eb2b33cb731 (patch) | |
| tree | 109e36f1d5a1f1c8e6d9c94b4c81c27e8fd46944 /src/cuda-sim/ptx_ir.cc | |
| parent | ad07a5645d60d1db972d1a063585deb1a9ac229c (diff) | |
1. updates to .gdbinit file
2. update texture to bypass ROP-delay queue... correlation now 0.9592
[git-p4: depot-paths = "//depot/gpgpu_sim_research/fermi/distribution/": change = 7912]
Diffstat (limited to 'src/cuda-sim/ptx_ir.cc')
| -rw-r--r-- | src/cuda-sim/ptx_ir.cc | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/cuda-sim/ptx_ir.cc b/src/cuda-sim/ptx_ir.cc index 50167b8..b98e774 100644 --- a/src/cuda-sim/ptx_ir.cc +++ b/src/cuda-sim/ptx_ir.cc @@ -1193,8 +1193,9 @@ function_info::function_info(int entry_point ) m_local_mem_framesize = 0; } -void function_info::print_insn( unsigned pc, FILE * fp ) const +unsigned function_info::print_insn( unsigned pc, FILE * fp ) const { + unsigned inst_size=1; // return offset to next instruction or 1 if unknown unsigned index = pc - m_start_PC; char command[1024]; char buffer[1024]; @@ -1206,11 +1207,13 @@ void function_info::print_insn( unsigned pc, FILE * fp ) const if ( index >= m_instr_mem_size ) { fprintf(fp, "<past last instruction (max pc=%u)>", m_start_PC + m_instr_mem_size - 1 ); } else { - if ( m_instr_mem[index] != NULL ) + if ( m_instr_mem[index] != NULL ) { m_instr_mem[index]->print_insn(fp); - else + inst_size = m_instr_mem[index]->isize; + } else fprintf(fp, "<no instruction at pc = %u>", pc ); } + return inst_size; } void gpgpu_ptx_assemble( std::string kname, void *kinfo ) |
