diff options
| author | Jimmy Kwa <[email protected]> | 2010-12-09 11:56:44 -0800 |
|---|---|---|
| committer | Jimmy Kwa <[email protected]> | 2010-12-09 11:56:44 -0800 |
| commit | 6af42f32801f27d25feb4a7470b13bf23f2cd751 (patch) | |
| tree | e4491df46af3216bf76d30281b7becf34fee8752 /decuda_to_ptxplus | |
| parent | 52a638e84693fff528defbcbd24ecb58216baaba (diff) | |
Copied cuobjdump_to_ptxplus into fermi branch. Minor modifications were made to decuda_to_ptxplus to support this.
[git-p4: depot-paths = "//depot/gpgpu_sim_research/fermi/distribution/": change = 8229]
Diffstat (limited to 'decuda_to_ptxplus')
| -rw-r--r-- | decuda_to_ptxplus/decudaInst.cc | 21 | ||||
| -rw-r--r-- | decuda_to_ptxplus/decudaInst.h | 2 | ||||
| -rw-r--r-- | decuda_to_ptxplus/decudaInstList.h | 3 |
3 files changed, 17 insertions, 9 deletions
diff --git a/decuda_to_ptxplus/decudaInst.cc b/decuda_to_ptxplus/decudaInst.cc index 2328bc2..8b17135 100644 --- a/decuda_to_ptxplus/decudaInst.cc +++ b/decuda_to_ptxplus/decudaInst.cc @@ -11,7 +11,7 @@ decudaInst::decudaInst() { //initilize everything to empty m_label = ""; - m_predicate = ""; + m_predicate = new stringList(); m_base = ""; m_baseModifiers = new stringList(); m_typeModifiers = new stringList(); @@ -83,7 +83,10 @@ void decudaInst::addOperand(const char* addOp) void decudaInst::setPredicate(const char* setPredicateValue) { - m_predicate = setPredicateValue; + stringListPiece* tempPiece = new stringListPiece; + tempPiece->stringText = setPredicateValue; + + m_predicate->add(tempPiece); } void decudaInst::addPredicateModifier(const char* addPredicateMod) @@ -292,15 +295,17 @@ void decudaInst::printLabel() void decudaInst::printPredicate() { - if(m_predicate != "") { - output(m_predicate); + stringListPiece* currentPiece = m_predicate->getListStart(); + if(currentPiece!=NULL) + { + output(currentPiece->stringText); - stringListPiece* currentPiece = m_predicateModifiers->getListStart(); - for(int i=0; (i<m_predicateModifiers->getSize())&&(currentPiece!=NULL); i++) + stringListPiece* currentPiece2 = m_predicateModifiers->getListStart(); + for(int i=0; (i<m_predicateModifiers->getSize())&&(currentPiece2!=NULL); i++) { - output(currentPiece->stringText); + output(currentPiece2->stringText); - currentPiece = currentPiece->nextString; + currentPiece2 = currentPiece2->nextString; } output(" "); diff --git a/decuda_to_ptxplus/decudaInst.h b/decuda_to_ptxplus/decudaInst.h index 8b73cf1..bdf02d6 100644 --- a/decuda_to_ptxplus/decudaInst.h +++ b/decuda_to_ptxplus/decudaInst.h @@ -7,7 +7,7 @@ class decudaInst protected: //instruction data const char* m_label; //instruction label - const char* m_predicate; //instruction predicate + stringList* m_predicate; //instruction predicate const char* m_base; //instruction mnemonic stringList* m_baseModifiers; //base modifiers stringList* m_typeModifiers; //operand types diff --git a/decuda_to_ptxplus/decudaInstList.h b/decuda_to_ptxplus/decudaInstList.h index d1707c3..743815f 100644 --- a/decuda_to_ptxplus/decudaInstList.h +++ b/decuda_to_ptxplus/decudaInstList.h @@ -56,6 +56,9 @@ struct decudaEntry // Local memory size int m_lMemSize; + //use for recording used labels + std::list<std::string> m_labelList; + // Histogram for operation per cycle count std::map<std::string, int> m_opPerCycleHistogram; }; |
