diff options
| author | Mengchi Zhang <[email protected]> | 2019-07-03 20:54:01 -0400 |
|---|---|---|
| committer | GitHub <[email protected]> | 2019-07-03 20:54:01 -0400 |
| commit | ce63582472e027107783b81be40b2429bd8e8f73 (patch) | |
| tree | 36ce48f9e23cd20797b765c04b4161b08edf8398 /src/cuda-sim/ptx.l | |
| parent | c7b8987b313602bf0c3a6edb4830bfba3aa083ae (diff) | |
| parent | 60c38b0f77378eb111e88f632702d19dc3746cc7 (diff) | |
Merge pull request #21 from echoedit/dev
Dev
Diffstat (limited to 'src/cuda-sim/ptx.l')
| -rw-r--r-- | src/cuda-sim/ptx.l | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/cuda-sim/ptx.l b/src/cuda-sim/ptx.l index 18952a9..3a2a839 100644 --- a/src/cuda-sim/ptx.l +++ b/src/cuda-sim/ptx.l @@ -40,6 +40,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "ptx_parser.h" #include "ptx.tab.h" #include <string.h> +#include "../../libcuda/gpgpu_context.h" #define LINEBUF_SIZE (4*1024) #define TC recognizer->col+=strlen(yytext); @@ -452,8 +453,6 @@ breakaddr TC; yylval->int_value = BREAKADDR_OP; return OPCODE; <INITIAL,NOT_OPCODE,IN_FUNC_DECL>. TC; ptx_error(yyscanner, recognizer, (const char*)NULL); %% -extern const char *g_filename; - int ptx_error( yyscan_t yyscanner, ptx_recognizer* recognizer, const char *s ) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; @@ -461,7 +460,7 @@ int ptx_error( yyscan_t yyscanner, ptx_recognizer* recognizer, const char *s ) recognizer->g_error_detected = 1; fflush(stdout); if( s != NULL ) - printf("%s:%u Syntax error:\n\n", g_filename, yylineno ); + printf("%s:%u Syntax error:\n\n", recognizer->gpgpu_ctx->g_filename, yylineno ); printf(" %s\n", recognizer->linebuf ); printf(" "); for( i=0; i < recognizer->col-1; i++ ) { |
