Index: lib/Basic/Targets.cpp =================================================================== --- lib/Basic/Targets.cpp +++ lib/Basic/Targets.cpp @@ -4170,6 +4170,10 @@ unsigned getUnwindWordWidth() const override { return 64; } unsigned getRegisterWidth() const override { return 64; } + bool hasFloat128Type() const override { + return true; + } + bool validateGlobalRegisterVariable(StringRef RegName, unsigned RegSize, bool &HasSizeMismatch) const override { Index: test/Sema/128bitfloat.cpp =================================================================== --- test/Sema/128bitfloat.cpp +++ test/Sema/128bitfloat.cpp @@ -1,6 +1,16 @@ // RUN: %clang_cc1 -fsyntax-only -verify -std=gnu++11 %s // RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 %s +#ifdef __x86_64__ +__float128 f; +template struct __is_floating_point_helper {}; +template<> struct __is_floating_point_helper<__float128> {}; +int g(int x, __float128 *y) { + return x + *y; +} + +// expected-no-diagnostics +#else #if !defined(__STRICT_ANSI__) __float128 f; // expected-error {{__float128 is not supported on this target}} // But this should work: @@ -22,3 +32,4 @@ } #endif +#endif Index: test/Sema/attr-mode.c =================================================================== --- test/Sema/attr-mode.c +++ test/Sema/attr-mode.c @@ -76,7 +76,7 @@ void test_long_to_i64(long* y) { f_i64_arg(y); } void test_long_to_ui64(unsigned long* y) { f_ui64_arg(y); } #endif -typedef float f128ibm __attribute__ ((mode (TF))); // expected-error{{unsupported machine mode 'TF'}} +typedef float f128ibm __attribute__ ((mode (TF))); #elif TEST_64BIT_PPC64 typedef float f128ibm __attribute__ ((mode (TF))); typedef _Complex float c128ibm __attribute__ ((mode (TC)));