diff --git a/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp b/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp index c2ef0903615..c3ce11e3b5b 100644 --- a/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp +++ b/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp @@ -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