From 6bd512ea5b8cc098903fcb2dd802e652bbed2cb4 Mon Sep 17 00:00:00 2001 From: "Andrew M. B. Boktor" Date: Wed, 2 May 2012 12:33:33 -0800 Subject: Moving things where they belong cubojdump.l/.y are used to parse the output of cuobjdump, and thus should be part of libcuda not cuobjdump_to_ptxplus Included are also modifications to Makefiles [git-p4: depot-paths = "//depot/gpgpu_sim_research/fermi/distribution/": change = 12255] --- cuobjdump_to_ptxplus/cuobjdump.y | 83 ---------------------------------------- 1 file changed, 83 deletions(-) delete mode 100644 cuobjdump_to_ptxplus/cuobjdump.y (limited to 'cuobjdump_to_ptxplus/cuobjdump.y') diff --git a/cuobjdump_to_ptxplus/cuobjdump.y b/cuobjdump_to_ptxplus/cuobjdump.y deleted file mode 100644 index 0b20a83..0000000 --- a/cuobjdump_to_ptxplus/cuobjdump.y +++ /dev/null @@ -1,83 +0,0 @@ - /*Yacc file for output of cuobjdump*/ -%{ -#include - -int yylex(void); -void yyerror(const char*); -extern void addCuobjdumpSection(int sectiontype); -void setCuobjdumparch(const char* arch); -void setCuobjdumpidentifier(const char* identifier); -void setCuobjdumpptxfilename(const char* filename); -void setCuobjdumpelffilename(const char* filename); -void setCuobjdumpsassfilename(const char* filename); -int elfserial = 1; -int ptxserial = 1; -FILE *ptxfile; -FILE *elffile; -FILE *sassfile; -char filename [1024]; -%} -%union { - char* string_value; -} -%token H_SEPARATOR H_ARCH H_CODEVERSION H_PRODUCER H_HOST H_COMPILESIZE H_IDENTIFIER -%token CODEVERSION -%token STRING -%token FILENAME -%token DECIMAL -%token PTXHEADER ELFHEADER -%token PTXLINE -%token ELFLINE -%token SASSLINE -%token IDENTIFIER -%token NEWLINE - -%% - -program : emptylines section - | program section; - -emptylines : emptylines NEWLINE - | ; - -section : PTXHEADER { - addCuobjdumpSection(0); - snprintf(filename, 1024, "_cuobjdump_%d.ptx", ptxserial++); - ptxfile = fopen(filename, "w"); - setCuobjdumpptxfilename(filename); - } headerinfo ptxcode { - fclose(ptxfile); - } - | ELFHEADER { - addCuobjdumpSection(1); - snprintf(filename, 1024, "_cuobjdump_%d.elf", elfserial); - elffile = fopen(filename, "w"); - setCuobjdumpelffilename(filename); - } headerinfo elfcode { - fclose(elffile); - snprintf(filename, 1024, "_cuobjdump_%d.sass", elfserial++); - sassfile = fopen(filename, "w"); - setCuobjdumpsassfilename(filename); - } sasscode { - fclose(sassfile); - }; - -headerinfo : H_SEPARATOR NEWLINE - H_ARCH IDENTIFIER NEWLINE - H_CODEVERSION CODEVERSION NEWLINE - H_PRODUCER IDENTIFIER NEWLINE - H_HOST IDENTIFIER NEWLINE - H_COMPILESIZE IDENTIFIER NEWLINE - H_IDENTIFIER FILENAME {setCuobjdumparch($4); setCuobjdumpidentifier($19);}; - -ptxcode : ptxcode PTXLINE {fprintf(ptxfile, "%s", $2);} - | ; - -elfcode : elfcode ELFLINE {fprintf(elffile, "%s", $2);} - | ; - -sasscode : sasscode SASSLINE {fprintf(sassfile, "%s", $2)} - | ; - - -%% -- cgit v1.3