[llvm] r328298 - [ARM] Error out on .arm assembler directives on windows
Martin Storsjo via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 23 02:10:03 PDT 2018
Author: mstorsjo
Date: Fri Mar 23 02:10:03 2018
New Revision: 328298
URL: http://llvm.org/viewvc/llvm-project?rev=328298&view=rev
Log:
[ARM] Error out on .arm assembler directives on windows
Windows on arm is thumb only.
Differential Revision: https://reviews.llvm.org/D43005
Modified:
llvm/trunk/lib/Target/ARM/MCTargetDesc/ARMMCTargetDesc.cpp
llvm/trunk/test/MC/ARM/arm-thumb-cpus.s
Modified: llvm/trunk/lib/Target/ARM/MCTargetDesc/ARMMCTargetDesc.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/MCTargetDesc/ARMMCTargetDesc.cpp?rev=328298&r1=328297&r2=328298&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/MCTargetDesc/ARMMCTargetDesc.cpp (original)
+++ llvm/trunk/lib/Target/ARM/MCTargetDesc/ARMMCTargetDesc.cpp Fri Mar 23 02:10:03 2018
@@ -153,6 +153,13 @@ std::string ARM_MC::ParseARMTriple(const
ARMArchFeature += ",+nacl-trap";
}
+ if (TT.isOSWindows()) {
+ if (ARMArchFeature.empty())
+ ARMArchFeature = "+noarm";
+ else
+ ARMArchFeature += ",+noarm";
+ }
+
return ARMArchFeature;
}
Modified: llvm/trunk/test/MC/ARM/arm-thumb-cpus.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/ARM/arm-thumb-cpus.s?rev=328298&r1=328297&r2=328298&view=diff
==============================================================================
--- llvm/trunk/test/MC/ARM/arm-thumb-cpus.s (original)
+++ llvm/trunk/test/MC/ARM/arm-thumb-cpus.s Fri Mar 23 02:10:03 2018
@@ -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
More information about the llvm-commits
mailing list