From 7d02cbb061485db38ed8e5f6bf06c9b2fa40eed2 Mon Sep 17 00:00:00 2001 From: Mengchi Zhang Date: Wed, 12 Jun 2019 13:19:08 -0400 Subject: Integrate ptxinfo into gpgpu_context Signed-off-by: Mengchi Zhang --- src/cuda-sim/ptx_loader.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'src/cuda-sim/ptx_loader.h') diff --git a/src/cuda-sim/ptx_loader.h b/src/cuda-sim/ptx_loader.h index c3ce888..3637bff 100644 --- a/src/cuda-sim/ptx_loader.h +++ b/src/cuda-sim/ptx_loader.h @@ -44,8 +44,6 @@ class ptxinfo_data{ extern bool g_override_embedded_ptx; extern int no_of_ptx; //counter to track number of ptx files to be extracted in an application. -void gpgpu_ptxinfo_load_from_string( const char *p_for_info, unsigned source_num, unsigned sm_version=20, int no_of_ptx=0 ); -void gpgpu_ptx_info_load_from_filename( const char *filename, unsigned sm_version ); char* gpgpu_ptx_sim_convert_ptx_and_sass_to_ptxplus(const std::string ptx_str, const std::string sass_str, const std::string elf_str); bool keep_intermediate_files(); -- cgit v1.3 From 632bdaab79b9c1fd51ef8152aa00209f76c03101 Mon Sep 17 00:00:00 2001 From: Mengchi Zhang Date: Wed, 12 Jun 2019 19:55:35 -0400 Subject: Fix some compiler warning Signed-off-by: Mengchi Zhang --- src/cuda-sim/ptx_loader.h | 4 ++-- src/cuda-sim/ptx_parser.cc | 2 -- src/cuda-sim/ptx_parser.h | 9 ++++++--- 3 files changed, 8 insertions(+), 7 deletions(-) (limited to 'src/cuda-sim/ptx_loader.h') diff --git a/src/cuda-sim/ptx_loader.h b/src/cuda-sim/ptx_loader.h index 3637bff..ee09e16 100644 --- a/src/cuda-sim/ptx_loader.h +++ b/src/cuda-sim/ptx_loader.h @@ -29,12 +29,12 @@ #define PTX_LOADER_H_INCLUDED #include -#define LINEBUF_SIZE 1024 +#define PTXINFO_LINEBUF_SIZE 1024 typedef void * yyscan_t; class ptxinfo_data{ public: yyscan_t scanner; - char linebuf[LINEBUF_SIZE]; + char linebuf[PTXINFO_LINEBUF_SIZE]; unsigned col; const char *g_ptxinfo_filename; diff --git a/src/cuda-sim/ptx_parser.cc b/src/cuda-sim/ptx_parser.cc index a01d1e3..2872b84 100644 --- a/src/cuda-sim/ptx_parser.cc +++ b/src/cuda-sim/ptx_parser.cc @@ -63,9 +63,7 @@ std::map g_sym_name_to_symbol_table; fflush(stdout); \ } -static function_info *g_func_info = NULL; static std::map g_ptx_token_decode; -static operand_info g_return_var; const char *decode_token( int type ) { diff --git a/src/cuda-sim/ptx_parser.h b/src/cuda-sim/ptx_parser.h index c4e0b89..25c01fe 100644 --- a/src/cuda-sim/ptx_parser.h +++ b/src/cuda-sim/ptx_parser.h @@ -58,14 +58,15 @@ class ptx_recognizer { g_max_regs_per_thread = 0; g_global_symbol_table = NULL; g_current_symbol_table = NULL; - symbol *g_last_symbol = NULL; + g_last_symbol = NULL; g_error_detected = 0; g_entry_func_param_index=0; + g_func_info = NULL; } // global list yyscan_t scanner; -#define LINEBUF_SIZE (4*1024) - char linebuf[LINEBUF_SIZE]; +#define PTX_LINEBUF_SIZE (4*1024) + char linebuf[PTX_LINEBUF_SIZE]; unsigned col; int g_size; char *g_add_identifier_cached__identifier; @@ -100,6 +101,8 @@ class ptx_recognizer { std::list g_instructions; int g_error_detected; unsigned g_entry_func_param_index; + function_info *g_func_info; + operand_info g_return_var; // member function list void init_directive_state(); -- cgit v1.3