Thumb2 instructions are enabled only in unified assembler mode.
authorAnton Korobeynikov <asl@math.spbu.ru>
Wed, 17 Jun 2009 23:43:18 +0000 (23:43 +0000)
committerAnton Korobeynikov <asl@math.spbu.ru>
Wed, 17 Jun 2009 23:43:18 +0000 (23:43 +0000)
Emit switch directive for it. I have no idea whether this is
requirement for Darwin or not.

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

lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp

index c2ef090361596b3c5b9520485e353cb1e95e8e0f..c3ce11e3b5b6ece5a00b87142d6b11023942c288 100644 (file)
@@ -840,6 +840,10 @@ bool ARMAsmPrinter::doInitialization(Module &M) {
   if (Subtarget->isTargetDarwin())
     Mang->setUseQuotes(true);
 
+  // Thumb-2 instructions are supported only in unified assembler syntax mode.
+  if (Subtarget->isTargetELF() && Subtarget->hasThumb2())
+    O << "\t.syntax unified\n";
+
   // Emit ARM Build Attributes
   if (Subtarget->isTargetELF()) {
     // CPU Type