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/decudaInst.cc | |
| 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/decudaInst.cc')
| -rw-r--r-- | decuda_to_ptxplus/decudaInst.cc | 21 |
1 files changed, 13 insertions, 8 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(" "); |
