From 46045592211f1999983755726263c60267f8ef2f Mon Sep 17 00:00:00 2001 From: Jimmy Kwa Date: Thu, 6 Sep 2012 13:53:41 -0800 Subject: 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] --- cuobjdump_to_ptxplus/elf.y | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) (limited to 'cuobjdump_to_ptxplus/elf.y') 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 C1BEGIN CMEMVAL SPACE2 C0BEGIN STBEGIN STHEADER +%token C1BEGIN C14BEGIN CMEMVAL SPACE2 C0BEGIN STBEGIN STHEADER %token 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); + }; %% -- cgit v1.3