summaryrefslogtreecommitdiff
path: root/src/cuda-sim/ptx_ir.cc
diff options
context:
space:
mode:
authorMengchi Zhang <[email protected]>2019-07-15 16:17:07 -0400
committerMengchi Zhang <[email protected]>2019-07-15 16:17:07 -0400
commit352d2a3336b1c8e5258ca9d92d214973e98837c0 (patch)
treee903c64f229b7f288057faf0f766238adf4de797 /src/cuda-sim/ptx_ir.cc
parent1e57dc86369fbde8d31b4a629721c716ca2c3307 (diff)
Move s_g_pc_to_insn
Signed-off-by: Mengchi Zhang <[email protected]>
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 5fa9379..3384d49 100644
--- a/src/cuda-sim/ptx_ir.cc
+++ b/src/cuda-sim/ptx_ir.cc
@@ -43,6 +43,14 @@ typedef void * yyscan_t;
#define STR_SIZE 1024
+const ptx_instruction* gpgpu_context::pc_to_instruction(unsigned pc)
+{
+ if( pc < s_g_pc_to_insn.size() )
+ return s_g_pc_to_insn[pc];
+ else
+ return NULL;
+}
+
unsigned symbol::get_uid()
{
unsigned result = (gpgpu_ctx->symbol_sm_next_uid)++;