[PATCH] D53608: [builtins] Build float128 soft float builtins for x86_64.

Manoj Gupta via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 23 14:50:32 PDT 2018


manojgupta updated this revision to Diff 170756.
manojgupta added a comment.

Added checked for defined(__FLOAT128__) || defined(__SIZEOF_FLOAT128__)


Repository:
  rCRT Compiler Runtime

https://reviews.llvm.org/D53608

Files:
  lib/builtins/CMakeLists.txt
  lib/builtins/fp_lib.h


Index: lib/builtins/fp_lib.h
===================================================================
--- lib/builtins/fp_lib.h
+++ lib/builtins/fp_lib.h
@@ -103,11 +103,16 @@
 COMPILER_RT_ABI fp_t __adddf3(fp_t a, fp_t b);
 
 #elif defined QUAD_PRECISION
-#if __LDBL_MANT_DIG__ == 113
+// __LDBL_MANT_DIG__ is set to 64 for x86_64.
+#if __LDBL_MANT_DIG__ == 113 || defined(__x86_64__)
 #define CRT_LDBL_128BIT
 typedef __uint128_t rep_t;
 typedef __int128_t srep_t;
+#if defined(__FLOAT128__) || defined(__SIZEOF_FLOAT128__)
+typedef __float128 fp_t;
+#else
 typedef long double fp_t;
+#endif
 #define REP_C (__uint128_t)
 // Note: Since there is no explicit way to tell compiler the constant is a
 // 128-bit integer, we let the constant be casted to 128-bit integer
Index: lib/builtins/CMakeLists.txt
===================================================================
--- lib/builtins/CMakeLists.txt
+++ lib/builtins/CMakeLists.txt
@@ -232,6 +232,7 @@
 
 if (NOT MSVC)
   set(x86_64_SOURCES
+      ${GENERIC_TF_SOURCES}
       x86_64/floatdidf.c
       x86_64/floatdisf.c
       x86_64/floatdixf.c


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D53608.170756.patch
Type: text/x-patch
Size: 1097 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20181023/7c9a574a/attachment.bin>


More information about the cfe-commits mailing list