diff options
Diffstat (limited to 'src/compiler/IntermediateRep.cc')
| -rw-r--r-- | src/compiler/IntermediateRep.cc | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/src/compiler/IntermediateRep.cc b/src/compiler/IntermediateRep.cc index 1567fccf1a..662687777d 100644 --- a/src/compiler/IntermediateRep.cc +++ b/src/compiler/IntermediateRep.cc @@ -19,6 +19,52 @@ namespace art { +static const char* gOpKindNames[kOpInvalid + 1] = { + "OpMov", + "OpMvn", + "OpCmp", + "OpLsl", + "OpLsr", + "OpAsr", + "OpRor", + "OpNot", + "OpAnd", + "OpOr", + "OpXor", + "OpNeg", + "OpAdd", + "OpAdc", + "OpSub", + "OpSbc", + "OpRsub", + "OpMul", + "OpDiv", + "OpRem", + "OpBic", + "OpCmn", + "OpTst", + "OpBkpt", + "OpBlx", + "OpPush", + "OpPop", + "Op2Char", + "Op2Short", + "Op2Byte", + "OpCondBr", + "OpUncondBr", + "OpBx", + "OpInvalid", +}; + +std::ostream& operator<<(std::ostream& os, const OpKind& kind) { + if (kind >= kOpMov && kind <= kOpInvalid) { + os << gOpKindNames[kind]; + } else { + os << "Unknown Op " << static_cast<int>(kind); + } + return os; +} + /* Allocate a new basic block */ BasicBlock* oatNewBB(CompilationUnit* cUnit, BBType blockType, int blockId) { |