[PATCH] D43005: [ARM] Error out on .arm assembler directives on windows
Martin Storsjö via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 7 02:06:49 PST 2018
mstorsjo created this revision.
mstorsjo added reviewers: compnerd, peter.smith.
Herald added subscribers: kristof.beyls, javed.absar, aemerson.
Windows on arm is thumb only.
We already set the NoARM variable in ARMSubtarget but we don't clear the FeatureNoARM feature bit. Clearing it from there doesn't seem to be enough when assembling .s files from clang though.
Repository:
rL LLVM
https://reviews.llvm.org/D43005
Files:
lib/Target/ARM/AsmParser/ARMAsmParser.cpp
test/MC/ARM/arm-thumb-cpus.s
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 < %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
Index: lib/Target/ARM/AsmParser/ARMAsmParser.cpp
===================================================================
--- lib/Target/ARM/AsmParser/ARMAsmParser.cpp
+++ lib/Target/ARM/AsmParser/ARMAsmParser.cpp
@@ -483,7 +483,8 @@
}
bool hasARM() const {
- return !getSTI().getFeatureBits()[ARM::FeatureNoARM];
+ return !getSTI().getFeatureBits()[ARM::FeatureNoARM] &&
+ !getSTI().getTargetTriple().isOSWindows();
}
bool hasDSP() const {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D43005.133172.patch
Type: text/x-patch
Size: 1054 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180207/0ce2102c/attachment.bin>
More information about the llvm-commits
mailing list