Index: lib/Target/ARM/MCTargetDesc/ARMMCTargetDesc.cpp =================================================================== --- lib/Target/ARM/MCTargetDesc/ARMMCTargetDesc.cpp +++ lib/Target/ARM/MCTargetDesc/ARMMCTargetDesc.cpp @@ -153,6 +153,13 @@ ARMArchFeature += ",+nacl-trap"; } + if (TT.isOSWindows()) { + if (ARMArchFeature.empty()) + ARMArchFeature = "+noarm"; + else + ARMArchFeature += ",+noarm"; + } + return ARMArchFeature; } Index: test/MC/ARM/arm-thumb-cpus.s =================================================================== --- test/MC/ARM/arm-thumb-cpus.s +++ test/MC/ARM/arm-thumb-cpus.s @@ -19,6 +19,9 @@ @ RUN: not llvm-mc -show-encoding -triple=armv6sm-eabi < %s 2>&1 \ @ RUN: | FileCheck %s --check-prefix=CHECK-THUMB-ONLY +@ RUN: not llvm-mc -show-encoding -triple=thumbv7-win32-gnu < %s 2>&1 \ +@ RUN: | FileCheck %s --check-prefix=CHECK-THUMB-ONLY + @ Make sure correct diagnostics are given for CPUs without support for @ one or other of the execution states. .thumb