summaryrefslogtreecommitdiff
path: root/src/cuda-sim
diff options
context:
space:
mode:
Diffstat (limited to 'src/cuda-sim')
-rw-r--r--src/cuda-sim/ptx_loader.h4
-rw-r--r--src/cuda-sim/ptx_parser.cc2
-rw-r--r--src/cuda-sim/ptx_parser.h9
3 files changed, 8 insertions, 7 deletions
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 <string>
-#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<std::string,symbol_table*> g_sym_name_to_symbol_table;
fflush(stdout); \
}
-static function_info *g_func_info = NULL;
static std::map<unsigned,std::string> 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<ptx_instruction*> 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();