[PATCH] [COMPILER_RT] add long double setting in fp_lib.h

GuanHong Liu koviankevin at hotmail.com
Thu Feb 27 01:56:08 PST 2014


  The line number of previous comment is wrong


================
Comment at: lib/builtins/fp_lib.h:175
@@ +174,3 @@
+    const __uint128_t r1 = (sum0 >> 64) +
+                           ((sum1 >> 32) & Word_HiMask) +
+                           (sum2 & Word_FullMask) +
----------------
What we need are the 2nd and 3rd word of sum1, so it should use Word_FullMask instead of Word_HiMask

================
Comment at: lib/builtins/fp_lib.h:196
@@ +195,3 @@
+#else
+#error Unsupported long double format
+#endif // __LDBL_MANT_DIG__ == 113
----------------
In our implmentation of functions implemented, we define #QUAD_PRECISION and include this file first , and then check whether CRT_LDBL_128BIT has been defined. So this line will make all targets whose __LDBL_MANT_DIG__ is not 113 fail.


http://llvm-reviews.chandlerc.com/D2796



More information about the llvm-commits mailing list