[PATCH] [COMPILER_RT] add long double setting in fp_lib.h
GuanHong Liu
koviankevin at hotmail.com
Thu Feb 27 01:38:47 PST 2014
================
Comment at: lib/builtins/fp_lib.h:106
@@ -89,1 +105,3 @@
+ struct { uint64_t high, low; } s;
#else
+ struct { uint64_t low, high; } s;
----------------
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:127
@@ +126,3 @@
+#define Word_HiMask UINT64_C(0xffffffff00000000)
+#define Word_FullMask UINT64_C(0xffffffffffffffff)
+#define Word_1(a) (uint64_t)((a >> 96) & Word_LoMask)
----------------
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