From 8d59181b80697dfc717abcd55da9c899e4cf0d07 Mon Sep 17 00:00:00 2001 From: Inderpreet Singh Date: Wed, 18 Jul 2012 23:17:29 -0800 Subject: Copied in Arun's SIMT stack fix for recursive calls (CL8574) [git-p4: depot-paths = "//depot/gpgpu_sim_research/fermi/distribution/": change = 13410] --- src/cuda-sim/ptx_ir.cc | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/cuda-sim/ptx_ir.cc') diff --git a/src/cuda-sim/ptx_ir.cc b/src/cuda-sim/ptx_ir.cc index 102ae40..61b45e3 100644 --- a/src/cuda-sim/ptx_ir.cc +++ b/src/cuda-sim/ptx_ir.cc @@ -1162,6 +1162,19 @@ ptx_instruction::ptx_instruction( int opcode, m_source_file = file?file:""; m_source_line = line; m_source = source; + + if (opcode == CALL_OP) { + const operand_info &target = func_addr(); + assert( target.is_function_address() ); + const symbol *func_addr = target.get_symbol(); + const function_info *target_func = func_addr->get_pc(); + std::string fname = target_func->get_name(); + + if (fname =="vprintf"){ + m_is_printf = true; + } + + } } void ptx_instruction::print_insn() const -- cgit v1.3