[Openmp-commits] [PATCH] D54102: Clang enable __float128 on x86 and x86_64

Peiyuan Song via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Mon Nov 5 06:14:27 PST 2018


SquallATF created this revision.
Herald added a subscriber: openmp-commits.

if target has float128 will define `__SIZEOF_FLOAT128__`.(X86.cpp#L1268 <https://github.com/llvm-mirror/clang/blob/96cb1f83062da466e605acdc276673a5959c1579/lib/Basic/Targets/X86.cpp#L1268>)


Repository:
  rOMP OpenMP

https://reviews.llvm.org/D54102

Files:
  runtime/src/kmp_os.h


Index: runtime/src/kmp_os.h
===================================================================
--- runtime/src/kmp_os.h
+++ runtime/src/kmp_os.h
@@ -82,9 +82,13 @@
 #undef KMP_HAVE_QUAD
 #define KMP_HAVE_QUAD 1
 #elif KMP_COMPILER_CLANG
-/* Clang doesn't support a software-implemented
-   128-bit extended precision type yet */
+#ifdef __SIZEOF_FLOAT128__
+typedef __float128 _Quad;
+#undef KMP_HAVE_QUAD
+#define KMP_HAVE_QUAD 1
+#else
 typedef long double _Quad;
+#endif
 #elif KMP_COMPILER_GCC
 typedef __float128 _Quad;
 #undef KMP_HAVE_QUAD


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D54102.172578.patch
Type: text/x-patch
Size: 548 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20181105/7d61232a/attachment-0001.bin>


More information about the Openmp-commits mailing list