]> granicus.if.org Git - clang/commitdiff
Change ARM data layout strings to match llvm-gcc.
authorBob Wilson <bob.wilson@apple.com>
Mon, 4 Apr 2011 16:53:11 +0000 (16:53 +0000)
committerBob Wilson <bob.wilson@apple.com>
Mon, 4 Apr 2011 16:53:11 +0000 (16:53 +0000)
Sandeep Patel noticed that the alignment was wrong for Neon vector types,
and this change is partly derived from his patch.  For the APCS ABI, however,
additional changes were required: the maximum ABI alignment is 32 bits and
the preferred alignment for i64 and f64 types should be 64 bits.

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

lib/Basic/Targets.cpp

index 90b0ee0c87e306c64dd26a694c335a33348aee9a..00c8657e2bbe48e7667b5f0b5be0d37e8f691cb8 100644 (file)
@@ -1731,11 +1731,11 @@ public:
     if (IsThumb) {
       DescriptionString = ("e-p:32:32:32-i1:8:32-i8:8:32-i16:16:32-i32:32:32-"
                            "i64:64:64-f32:32:32-f64:64:64-"
-                           "v64:64:64-v128:128:128-a0:0:32-n32");
+                           "v64:64:64-v128:64:128-a0:0:32-n32");
     } else {
       DescriptionString = ("e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-"
                            "i64:64:64-f32:32:32-f64:64:64-"
-                           "v64:64:64-v128:128:128-a0:0:64-n32");
+                           "v64:64:64-v128:64:128-a0:0:64-n32");
     }
 
     // ARM targets default to using the ARM C++ ABI.
@@ -1760,11 +1760,11 @@ public:
       if (IsThumb) {
         DescriptionString = ("e-p:32:32:32-i1:8:32-i8:8:32-i16:16:32-i32:32:32-"
                              "i64:32:32-f32:32:32-f64:32:32-"
-                             "v64:64:64-v128:128:128-a0:0:32-n32");
+                             "v64:32:64-v128:32:128-a0:0:32-n32");
       } else {
         DescriptionString = ("e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-"
-                             "i64:32:32-f32:32:32-f64:32:32-"
-                             "v64:64:64-v128:128:128-a0:0:64-n32");
+                             "i64:32:64-f32:32:32-f64:32:64-"
+                             "v64:32:64-v128:32:128-a0:0:32-n32");
       }
 
       // FIXME: Override "preferred align" for double and long long.