[llvm-commits] [llvm] r138562 - /llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp

Jim Grosbach grosbach at apple.com
Thu Aug 25 10:23:56 PDT 2011


Author: grosbach
Date: Thu Aug 25 12:23:55 2011
New Revision: 138562

URL: http://llvm.org/viewvc/llvm-project?rev=138562&view=rev
Log:
Explicitly disallow predication in Thumb1 assembly.

Modified:
    llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp

Modified: llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp?rev=138562&r1=138561&r2=138562&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp (original)
+++ llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp Thu Aug 25 12:23:55 2011
@@ -2952,6 +2952,12 @@
   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





More information about the llvm-commits mailing list