[ARM] armv6m + netbsd. Tests are misssing for armv6m + darwin as well.
Differential Revision: http://reviews.llvm.org/D13217
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@249308
91177308-0d34-0410-b5e6-
96231b3b80d8
if (Feature[0] == '+')
Features[Feature+1] = true;
- if (ArchVersion < 6 ||
- (ArchVersion == 6 && ArchProfile == llvm::ARM::PK_M))
- Features["strict-align"] = true;
-
return TargetInfo::initFeatureMap(Features, Diags, CPU, FeaturesVec);
}
// The above behavior is consistent with GCC.
int VersionNum = getARMSubArchVersionNumber(Triple);
if (Triple.isOSDarwin() || Triple.isOSNetBSD()) {
- if (VersionNum < 6)
+ if (VersionNum < 6 ||
+ Triple.getSubArch() == llvm::Triple::SubArchType::ARMSubArch_v6m)
Features.push_back("+strict-align");
} else if (Triple.isOSLinux() || Triple.isOSNaCl()) {
if (VersionNum < 7)
// RUN: %clang -target armv6-unknown-nacl-gnueabihf -### %s 2> %t
// RUN: FileCheck --check-prefix=CHECK-ALIGNED-ARM < %t %s
+// RUN: %clang -target armv6m-apple-darwin -### %s 2> %t
+// RUN: FileCheck --check-prefix=CHECK-ALIGNED-ARM < %t %s
+
+// RUN: %clang -target armv6m-netbsd-eabi -### %s 2> %t
+// RUN: FileCheck --check-prefix=CHECK-ALIGNED-ARM < %t %s
+
// RUN: %clang -target aarch64-none-gnueabi -mno-unaligned-access -### %s 2> %t
// RUN: FileCheck --check-prefix=CHECK-ALIGNED-AARCH64 < %t %s