aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Grosbach <grosbach@apple.com>2011-08-25 17:23:55 +0000
committerJim Grosbach <grosbach@apple.com>2011-08-25 17:23:55 +0000
commit0c49ac05cd2374a99a3126ebe6c8370490a73ca5 (patch)
tree1274ac58db8c6a400595d7af0b02eaeab0bbb023
parentebc1db0facf4748b14c901032f0afb3d5ff56c2e (diff)
Explicitly disallow predication in Thumb1 assembly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138562 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Target/ARM/AsmParser/ARMAsmParser.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/Target/ARM/AsmParser/ARMAsmParser.cpp b/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
index f5d2a0ea3d..f0d74f3345 100644
--- a/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
+++ b/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
@@ -2952,6 +2952,12 @@ bool ARMAsmParser::ParseInstruction(StringRef Name, SMLoc NameLoc,
Mnemonic = splitMnemonic(Mnemonic, PredicationCode, CarrySetting,
ProcessorIMod);
+ // In Thumb1, only the branch (B) instruction can be predicated.
+ if (isThumbOne() && PredicationCode != ARMCC::AL && Mnemonic != "b") {
+ Parser.EatToEndOfStatement();
+ return Error(NameLoc, "conditional execution not supported in Thumb1");
+ }
+
Operands.push_back(ARMOperand::CreateToken(Mnemonic, NameLoc));
// FIXME: This is all a pretty gross hack. We should automatically handle