Thumb2 instructions are enabled only in unified assembler mode.
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
diff --git a/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp b/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp
index c2ef090..c3ce11e 100644
--- a/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp
+++ b/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp
@@ -840,6 +840,10 @@
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