summaryrefslogtreecommitdiff
path: root/cuobjdump_to_ptxplus/elf.y
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.y
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.y')
-rw-r--r--cuobjdump_to_ptxplus/elf.y23
1 files changed, 21 insertions, 2 deletions
diff --git a/cuobjdump_to_ptxplus/elf.y b/cuobjdump_to_ptxplus/elf.y
index f521518..fe471da 100644
--- a/cuobjdump_to_ptxplus/elf.y
+++ b/cuobjdump_to_ptxplus/elf.y
@@ -43,7 +43,7 @@ bool lastcmem = false;// false = constrant0, true = constant1
%union {
char* string_value;
}
-%token <string_value> C1BEGIN CMEMVAL SPACE2 C0BEGIN STBEGIN STHEADER
+%token <string_value> C1BEGIN C14BEGIN CMEMVAL SPACE2 C0BEGIN STBEGIN STHEADER
%token <string_value> NUMBER HEXNUMBER IDENTIFIER LOCALMEM
%%
@@ -58,8 +58,15 @@ stcontent : stcontent stline
| stline;
stline : NUMBER NUMBER NUMBER NUMBER NUMBER NUMBER IDENTIFIER {
+ if (strcmp($7, ".nv.global")==0) {
+ g_instList->setglobalVarShndx($6);
+ }
if (strcmp($4, "11")==0) {
- g_instList->addConstMemoryPtr($2, $3, $7);
+ if(atoi($6) == g_instList->getglobalVarShndx()) {
+ g_instList->addGlobalMemoryID($3, $7);
+ } else {
+ g_instList->addConstMemoryPtr($2, $3, $7);
+ }
}
}
| NUMBER NUMBER NUMBER NUMBER NUMBER NUMBER {}
@@ -67,6 +74,7 @@ stline : NUMBER NUMBER NUMBER NUMBER NUMBER NUMBER IDENTIFIER {
program : program cmemsection
| program localmemsection
+ | program cmem14section
| {
g_instList->setKernelCount(cmemcount-1);
};
@@ -96,4 +104,15 @@ cmemvals : cmemvals CMEMVAL SPACE2 {
g_instList->addConstMemoryValue($3);
}
| ;
+
+cmem14section : C14BEGIN c14content
+ | C14BEGIN
+ ;
+
+c14content : c14content c14line
+ | c14line;
+
+c14line : NUMBER IDENTIFIER IDENTIFIER {
+ g_instList->updateGlobalMemoryID($1, $2);
+ };
%%