summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorSean Callanan <scallanan@apple.com>2010-05-11 01:27:08 +0000
committerSean Callanan <scallanan@apple.com>2010-05-11 01:27:08 +0000
commit972bf8dea1001134f575a1c6362e1c12eed579d0 (patch)
tree82a34538e33eeaf6e66b6655d4e5371aec4b6ecd /tools
parent0ce537a9db2da085ab50b15d2454cb7cac460eb7 (diff)
downloadllvm-972bf8dea1001134f575a1c6362e1c12eed579d0.tar.gz
llvm-972bf8dea1001134f575a1c6362e1c12eed579d0.tar.bz2
llvm-972bf8dea1001134f575a1c6362e1c12eed579d0.tar.xz
Extended the edis "IsBranch" property to call
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
Diffstat (limited to 'tools')
-rw-r--r--tools/edis/EDInst.cpp4
-rw-r--r--tools/llvm-mc/Disassembler.cpp5
2 files changed, 8 insertions, 1 deletions
diff --git a/tools/edis/EDInst.cpp b/tools/edis/EDInst.cpp
index af3a54abbc..c009f0f868 100644
--- a/tools/edis/EDInst.cpp
+++ b/tools/edis/EDInst.cpp
@@ -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;
}
diff --git a/tools/llvm-mc/Disassembler.cpp b/tools/llvm-mc/Disassembler.cpp
index e2120c25d3..37b2cb8056 100644
--- a/tools/llvm-mc/Disassembler.cpp
+++ b/tools/llvm-mc/Disassembler.cpp
@@ -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);