1263320SdimPull in r199399 from upstream clang trunk (by Jakob Stoklund Olesen): 2263320Sdim 3263320Sdim SPARCv9 implements long double as an IEEE quad. 4263320Sdim 5263320SdimIntroduced here: http://svn.freebsd.org/changeset/base/262262 6263320Sdim 7263320SdimIndex: tools/clang/test/CodeGen/sparcv9-abi.c 8263320Sdim=================================================================== 9263320Sdim--- tools/clang/test/CodeGen/sparcv9-abi.c 10263320Sdim+++ tools/clang/test/CodeGen/sparcv9-abi.c 11263320Sdim@@ -18,6 +18,9 @@ long long f_int_3(long long x) { return x; } 12263320Sdim // CHECK-LABEL: define signext i8 @f_int_4(i8 signext %x) 13263320Sdim char f_int_4(char x) { return x; } 14263320Sdim 15263320Sdim+// CHECK-LABEL: define fp128 @f_ld(fp128 %x) 16263320Sdim+long double f_ld(long double x) { return x; } 17263320Sdim+ 18263320Sdim // Small structs are passed in registers. 19263320Sdim struct small { 20263320Sdim int *a, *b; 21263320SdimIndex: tools/clang/lib/Basic/Targets.cpp 22263320Sdim=================================================================== 23263320Sdim--- tools/clang/lib/Basic/Targets.cpp 24263320Sdim+++ tools/clang/lib/Basic/Targets.cpp 25263320Sdim@@ -4529,6 +4529,12 @@ class SparcV9TargetInfo : public SparcTargetInfo { 26263320Sdim UIntMaxType = UnsignedLong; 27263320Sdim } 28263320Sdim Int64Type = IntMaxType; 29263320Sdim+ 30263320Sdim+ // The SPARCv8 System V ABI has long double 128-bits in size, but 64-bit 31263320Sdim+ // aligned. The SPARCv9 SCD 2.4.1 says 16-byte aligned. 32263320Sdim+ LongDoubleWidth = 128; 33263320Sdim+ LongDoubleAlign = 128; 34263320Sdim+ LongDoubleFormat = &llvm::APFloat::IEEEquad; 35263320Sdim } 36263320Sdim 37263320Sdim virtual void getTargetDefines(const LangOptions &Opts, 38