[cfe-commits] [PATCH][PR-11867] Fix "long double" and __SIZE_TYPE__ on powerpc

Jeremy Huddleston jeremyhu at apple.com
Fri Jan 27 15:16:59 PST 2012


http://llvm.org/bugs/show_bug.cgi?id=11867

Index: lib/Basic/Targets.cpp
===================================================================
--- lib/Basic/Targets.cpp	(revision 149121)
+++ lib/Basic/Targets.cpp	(working copy)
@@ -564,7 +564,10 @@
   static const char * const GCCRegNames[];
   static const TargetInfo::GCCRegAlias GCCRegAliases[];
 public:
-  PPCTargetInfo(const std::string& triple) : TargetInfo(triple) {}
+  PPCTargetInfo(const std::string& triple) : TargetInfo(triple) {
+    LongDoubleWidth = LongDoubleAlign = 128;
+    LongDoubleFormat = &llvm::APFloat::PPCDoubleDouble;
+  }
 
   virtual void getTargetBuiltins(const Builtin::Info *&Records,
                                  unsigned &NumRecords) const {
@@ -840,6 +843,7 @@
                         "i64:64:64-f32:32:32-f64:64:64-v128:128:128-n32";
 
     switch (getTriple().getOS()) {
+    case llvm::Triple::Linux:
     case llvm::Triple::FreeBSD:
     case llvm::Triple::NetBSD:
       SizeType = UnsignedInt;




More information about the cfe-commits mailing list