summaryrefslogtreecommitdiff
path: root/include/llvm/MC/MCInstrDesc.h
diff options
context:
space:
mode:
authorJim Grosbach <grosbach@apple.com>2011-08-29 22:24:09 +0000
committerJim Grosbach <grosbach@apple.com>2011-08-29 22:24:09 +0000
commitf8e1e3e729473b8b2b7ee6134b6417976af84d05 (patch)
tree6c399c1a488d4a634f696f6043cba6a3e65431b7 /include/llvm/MC/MCInstrDesc.h
parentfff64ca9cfdcb8e2fd2e124fcda1c1053523afc6 (diff)
downloadllvm-f8e1e3e729473b8b2b7ee6134b6417976af84d05.tar.gz
llvm-f8e1e3e729473b8b2b7ee6134b6417976af84d05.tar.bz2
llvm-f8e1e3e729473b8b2b7ee6134b6417976af84d05.tar.xz
Thumb2 parsing and encoding for IT blocks.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138773 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/MC/MCInstrDesc.h')
-rw-r--r--include/llvm/MC/MCInstrDesc.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/llvm/MC/MCInstrDesc.h b/include/llvm/MC/MCInstrDesc.h
index c49e02e689..5f5fa4c2f3 100644
--- a/include/llvm/MC/MCInstrDesc.h
+++ b/include/llvm/MC/MCInstrDesc.h
@@ -289,6 +289,18 @@ public:
return Flags & (1 << MCID::Barrier);
}
+ /// findFirstPredOperandIdx() - Find the index of the first operand in the
+ /// operand list that is used to represent the predicate. It returns -1 if
+ /// none is found.
+ int findFirstPredOperandIdx() const {
+ if (isPredicable()) {
+ for (unsigned i = 0, e = getNumOperands(); i != e; ++i)
+ if (OpInfo[i].isPredicate())
+ return i;
+ }
+ return -1;
+ }
+
/// isTerminator - Returns true if this instruction part of the terminator for
/// a basic block. Typically this is things like return and branch
/// instructions.