summaryrefslogtreecommitdiff
path: root/cuobjdump_to_ptxplus/elf.l
diff options
context:
space:
mode:
authorJimmy Kwa <[email protected]>2012-09-06 13:53:41 -0800
committerAndrew Boktor <[email protected]>2014-08-14 13:48:55 -0700
commit46045592211f1999983755726263c60267f8ef2f (patch)
treedd85fc576f40a731b32b76d84b8dcc264a628871 /cuobjdump_to_ptxplus/elf.l
parent99ff7de8db264b902f0eaa5828c0a508e3986b56 (diff)
Several changes to ptxplus towards getting the sphyraena benchmark to work. Add .false modifier to cuobjdump_to_ptxplus. It isn't supported in gpgpusim yet since we don't know what it does. Fixed most of the issues with global (const14) variable not being declared properly. Added "BRX" instruction to cuobjdump_to_ptxplus and some support for it in gpgpusim. There are other issues with it that still need to be worked out. Added support for translating IADD.CARRY sass instruction into ptxplus addp instructions. Fixed a bug with generating ".half" modifiers on instructions so the ptxplus instruction addresses should match sass addresses now. Separated ssy instructions from nop. However, they are still simulated as nop in gpgpusim. Sometime cuobjdump generate a blank link that takes up an address slot. This was changed to a nop.
[git-p4: depot-paths = "//depot/gpgpu_sim_research/fermi/distribution/": change = 14001]
Diffstat (limited to 'cuobjdump_to_ptxplus/elf.l')
-rw-r--r--cuobjdump_to_ptxplus/elf.l21
1 files changed, 13 insertions, 8 deletions
diff --git a/cuobjdump_to_ptxplus/elf.l b/cuobjdump_to_ptxplus/elf.l
index 61c4d02..956550c 100644
--- a/cuobjdump_to_ptxplus/elf.l
+++ b/cuobjdump_to_ptxplus/elf.l
@@ -43,6 +43,7 @@ void elf_error(const char*);
%x cmem
%x symtab
+%x cmem14
whitespace [ \t]
newline [\n]
@@ -52,23 +53,27 @@ ident [[:alnum:]_\.]
hexdigit [[:digit:]abcdef]
%%
-<cmem,INITIAL>\.nv\.constant1\.{notnewline}*{newline} {
+<cmem,cmem14,INITIAL>\.nv\.constant1\.{notnewline}*{newline} {
BEGIN(cmem);
yylval.string_value = strdup(yytext);
return C1BEGIN;
}
-<cmem,INITIAL>\.nv\.local{notnewline}*{newline} {
+<cmem,cmem14,INITIAL>\.nv\.local{notnewline}*{newline} {
BEGIN(INITIAL);
yylval.string_value = strdup(yytext);
return LOCALMEM;
}
-<cmem,INITIAL>\.nv\.constant0{notnewline}*{newline} {
+<cmem,cmem14,INITIAL>\.nv\.constant0{notnewline}*{newline} {
BEGIN(cmem);
return C0BEGIN;
}
+<cmem,cmem14,INITIAL>\.section" "\.rel\.nv\.constant14{notnewline}*{newline} {
+ BEGIN(cmem14);
+ return C14BEGIN;
+}
\.section" "\.symtab\tSYMTAB{newline} {
BEGIN(symtab);
@@ -79,7 +84,7 @@ hexdigit [[:digit:]abcdef]
//These are the lines before the symtab
}
-<cmem,INITIAL>\.{notnewline}*{newline} {
+<cmem,cmem14,INITIAL>\.{notnewline}*{newline} {
BEGIN(INITIAL);
}
@@ -102,16 +107,16 @@ hexdigit [[:digit:]abcdef]
return STHEADER;
}
-<symtab>{whitespace}+ {}
+<symtab,cmem14>{whitespace}+ {}
-<symtab>{newline} {}
+<symtab,cmem14>{newline} {}
-<symtab>{hexdigit}+ {
+<symtab,cmem14>{hexdigit}+ {
yylval.string_value = strdup(yytext);
return NUMBER;
}
-<symtab>{ident}+ {
+<symtab,cmem14>{ident}+ {
yylval.string_value = strdup(yytext);
return IDENTIFIER;
}