summaryrefslogtreecommitdiff
path: root/cuobjdump_to_ptxplus/cuobjdumpInst.cc
diff options
context:
space:
mode:
authorAndrew M. B. Boktor <[email protected]>2012-07-10 23:00:30 -0800
committerAndrew Boktor <[email protected]>2014-08-14 13:47:33 -0700
commitdc45f0ec4b16144c248fb86acc905fbb5b627300 (patch)
tree9a67669f23b30b79602c94c43190fdd7435aa74a /cuobjdump_to_ptxplus/cuobjdumpInst.cc
parent6f99ffb9b171495df7ef0725f8a8cbffb8d9591c (diff)
Fix for bug #154-internal and #8-external
Adding support for double destination to mad instruction Fixing broken madp instruction Adding a patch to cuobjdump_to_ptxplus to work around the C3 problem (Documented in bug #154 internal). [git-p4: depot-paths = "//depot/gpgpu_sim_research/fermi/distribution/": change = 13349]
Diffstat (limited to 'cuobjdump_to_ptxplus/cuobjdumpInst.cc')
-rw-r--r--cuobjdump_to_ptxplus/cuobjdumpInst.cc16
1 files changed, 14 insertions, 2 deletions
diff --git a/cuobjdump_to_ptxplus/cuobjdumpInst.cc b/cuobjdump_to_ptxplus/cuobjdumpInst.cc
index 2bdac6d..b276c04 100644
--- a/cuobjdump_to_ptxplus/cuobjdumpInst.cc
+++ b/cuobjdump_to_ptxplus/cuobjdumpInst.cc
@@ -1228,8 +1228,20 @@ void cuobjdumpInst::printCuobjdumpPtxPlus(std::list<std::string> labelList, std:
}
else if(m_base == "IMAD")
{
- printCuobjdumpPredicate();
- output("mad.wide");
+ //Patching the C3 problem
+ if(m_predicate->size() > 0 &&
+ m_predicate->front() == "C3" &&
+ m_operands->back()[0] == '-'){
+ m_predicate->clear();
+ std::string op = m_operands->back();
+ m_operands->pop_back();
+ m_operands->push_back(op.substr(1));
+ m_operands->push_back("C1");
+ output("madp.wide");
+ } else {
+ printCuobjdumpPredicate();
+ output("mad.wide");
+ }
printCuobjdumpBaseModifiers();
if(m_typeModifiers->size() == 0)