Extended the edis "IsBranch" property to call
authorSean Callanan <scallanan@apple.com>
Tue, 11 May 2010 01:27:08 +0000 (01:27 +0000)
committerSean Callanan <scallanan@apple.com>
Tue, 11 May 2010 01:27:08 +0000 (01:27 +0000)
instructions as well.  Added support for checking
this to the llvm-mc tester as well.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103454 91177308-0d34-0410-b5e6-96231b3b80d8

tools/edis/EDInst.cpp
tools/llvm-mc/Disassembler.cpp

index af3a54abbcf0b9e4906d6116cbcecedfd3f6fa2c..c009f0f86871486c668e00c0b782c5a4686e5dd0 100644 (file)
@@ -81,7 +81,9 @@ unsigned EDInst::instID() {
 
 bool EDInst::isBranch() {
   if (ThisInstInfo)
-    return ThisInstInfo->instructionType == kInstructionTypeBranch;
+    return 
+      ThisInstInfo->instructionType == kInstructionTypeBranch ||
+      ThisInstInfo->instructionType == kInstructionTypeCall;
   else
     return false;
 }
index e2120c25d3abaa7622b38f32fe8824d502fa9f98..37b2cb805631d52527f3541dca52749c74607a71 100644 (file)
@@ -314,6 +314,11 @@ int Disassembler::disassembleEnhanced(const std::string &TS,
   }
   
   outs() << " ";
+    
+  if (EDInstIsBranch(inst))
+    outs() << "<br> ";
+  if (EDInstIsMove(inst))
+    outs() << "<mov> ";
   
   int numOperands = EDNumOperands(inst);