summaryrefslogtreecommitdiff
path: root/src/cuda-sim/ptx_parser.cc
diff options
context:
space:
mode:
authorJonathan <[email protected]>2018-06-04 16:53:23 -0700
committerJonathan <[email protected]>2018-06-04 16:53:23 -0700
commit73fea7152926dbc41cf008a4ed3402cc1feeefa7 (patch)
tree29dfb7ba55669240336cd191ff9661f5234c0dc7 /src/cuda-sim/ptx_parser.cc
parent2278609c8e279e7dfba49211256e818e3152318b (diff)
parses through all ptx files, TODO: need to impl dp4a
Diffstat (limited to 'src/cuda-sim/ptx_parser.cc')
-rw-r--r--src/cuda-sim/ptx_parser.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/cuda-sim/ptx_parser.cc b/src/cuda-sim/ptx_parser.cc
index a180da9..a51799a 100644
--- a/src/cuda-sim/ptx_parser.cc
+++ b/src/cuda-sim/ptx_parser.cc
@@ -32,6 +32,8 @@
extern int ptx_error( const char *s );
extern int ptx_lineno;
+extern int ptx_parse();
+extern FILE *ptx_in;
static const struct core_config *g_shader_core_config;
void set_ptx_warp_size(const struct core_config * warp_size)
@@ -135,6 +137,10 @@ symbol_table *init_parser( const char *ptx_filename )
g_ptx_token_decode[generic_space] = "generic_space";
g_ptx_token_decode[instruction_space] = "instruction_space";
+
+ ptx_in = fopen(ptx_filename, "r");
+ ptx_parse();
+ fclose(ptx_in);
return g_global_symbol_table;
}