]> granicus.if.org Git - clang/commitdiff
Fix the long double to be of width/align 64. Rename va_list_test to
authorRoman Divacky <rdivacky@freebsd.org>
Tue, 13 Mar 2012 19:20:17 +0000 (19:20 +0000)
committerRoman Divacky <rdivacky@freebsd.org>
Tue, 13 Mar 2012 19:20:17 +0000 (19:20 +0000)
powerpc_types and add testing for the (long) double there.

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

lib/Basic/Targets.cpp
test/CodeGen/powerpc_types.c [moved from test/CodeGen/va_list_test.c with 54% similarity]

index 85dfd78570b0e8f0886dd434a4a7f5c0cd895435..8ca91b3a374f66ec535d153149969d3a8f9ba878 100644 (file)
@@ -872,8 +872,10 @@ public:
       break;
     }
 
-    if (getTriple().getOS() == llvm::Triple::FreeBSD)
+    if (getTriple().getOS() == llvm::Triple::FreeBSD) {
+      LongDoubleWidth = LongDoubleAlign = 64;
       LongDoubleFormat = &llvm::APFloat::IEEEdouble;
+    }
   }
 
   virtual const char *getVAListDeclaration() const {
@@ -900,8 +902,10 @@ public:
     DescriptionString = "E-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-"
                         "i64:64:64-f32:32:32-f64:64:64-v128:128:128-n32:64";
 
-    if (getTriple().getOS() == llvm::Triple::FreeBSD)
+    if (getTriple().getOS() == llvm::Triple::FreeBSD) {
+      LongDoubleWidth = LongDoubleAlign = 64;
       LongDoubleFormat = &llvm::APFloat::IEEEdouble;
+    }
   }
   virtual const char *getVAListDeclaration() const {
     return "typedef char* __builtin_va_list;";
similarity index 54%
rename from test/CodeGen/va_list_test.c
rename to test/CodeGen/powerpc_types.c
index 74f7837d2d3c6b77a86cc9d347cf5277af3a35c6..b7d0f5de49859d2cdf05fc929645abea95c3b238 100644 (file)
@@ -4,3 +4,7 @@
 
 int va_list_size = sizeof(va_list);
 // SVR4-CHECK: va_list_size = global i32 12, align 4
+int long_double_size = sizeof(long double);
+// SVR4-CHECK: long_double_size = global i32 8, align 4
+int double_size = sizeof(double);
+// SVR4-CHECK: double_size = global i32 8, align 4