From 06435e77c580bf7737333929ed26d3863949bd15 Mon Sep 17 00:00:00 2001 From: Tor Aamodt Date: Sun, 8 Aug 2010 04:16:35 -0800 Subject: add listing function for ptx debugging print out compilation errors encountered during OpenCL to PTX conversion (still a bit cryptic) [git-p4: depot-paths = "//depot/gpgpu_sim_research/fermi/distribution/": change = 7162] --- src/cuda-sim/ptx_sim.cc | 10 ++++++++++ src/cuda-sim/ptx_sim.h | 2 ++ 2 files changed, 12 insertions(+) (limited to 'src/cuda-sim') diff --git a/src/cuda-sim/ptx_sim.cc b/src/cuda-sim/ptx_sim.cc index d7fa510..9a2acf6 100644 --- a/src/cuda-sim/ptx_sim.cc +++ b/src/cuda-sim/ptx_sim.cc @@ -434,6 +434,16 @@ std::string ptx_thread_info::get_location() const return std::string(buf); } +const ptx_instruction *ptx_thread_info::get_inst() const +{ + return m_func_info->get_instruction(m_PC); +} + +const ptx_instruction *ptx_thread_info::get_inst( addr_t pc ) const +{ + return m_func_info->get_instruction(pc); +} + void ptx_thread_info::dump_regs() { printf("Register File Contents:\n"); diff --git a/src/cuda-sim/ptx_sim.h b/src/cuda-sim/ptx_sim.h index 8de4127..c2bb533 100644 --- a/src/cuda-sim/ptx_sim.h +++ b/src/cuda-sim/ptx_sim.h @@ -400,6 +400,8 @@ public: bool callstack_pop(); void dump_callstack() const; std::string get_location() const; + const ptx_instruction *get_inst() const; + const ptx_instruction *get_inst( addr_t pc ) const; bool rpc_updated() const { return m_RPC_updated; } bool last_was_call() const { return m_last_was_call; } unsigned get_rpc() const { return m_RPC; } -- cgit v1.3