]> granicus.if.org Git - clang/commitdiff
GlobalISel (AArch64): fix ABI at border between GPRs and SP.
authorTim Northover <tnorthover@apple.com>
Thu, 17 Aug 2017 23:14:01 +0000 (23:14 +0000)
committerTim Northover <tnorthover@apple.com>
Thu, 17 Aug 2017 23:14:01 +0000 (23:14 +0000)
If a struct would end up half in GPRs and half on SP the ABI says it should
actually go entirely on the stack. We were getting this wrong in GlobalISel
before, causing compatibility issues.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@311137 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Driver/ToolChains/Arch/ARM.cpp

index 49bb23535d73e234fef2be322a306a611f55efa3..c69efd96e80f8c2122aefd9da4a042882cabeee0 100644 (file)
@@ -438,7 +438,7 @@ void arm::getARMTargetFeatures(const ToolChain &TC,
     //
     // The above behavior is consistent with GCC.
     int VersionNum = getARMSubArchVersionNumber(Triple);
-    if (Triple.isOSDarwin() || Triple.isOSNetBSD()) {
+    if (Triple.isOSBinFormatMachO() || Triple.isOSNetBSD()) {
       if (VersionNum < 6 ||
           Triple.getSubArch() == llvm::Triple::SubArchType::ARMSubArch_v6m)
         Features.push_back("+strict-align");