summaryrefslogtreecommitdiff
path: root/lib/builtins/floatundidf.c
diff options
context:
space:
mode:
authorSaleem Abdulrasool <compnerd@compnerd.org>2015-10-15 04:26:19 +0000
committerSaleem Abdulrasool <compnerd@compnerd.org>2015-10-15 04:26:19 +0000
commite09caa7d3f4e124ab8685a4d3a6dd3124848dcb9 (patch)
treeed3373cfa606a973c3038a009b74b6af1b1e50b4 /lib/builtins/floatundidf.c
parent15e5a1c564e36814f1ec57ab77c6d7923b190793 (diff)
builtins: Expand out floating point exponents for MSVC
MSVC 2013 doesnt support C99 fully, including the hexidecimal floating point representation. Use the expanded value to permit building with it. Patch by Tee Hao Wei! git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@250365 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/builtins/floatundidf.c')
-rw-r--r--lib/builtins/floatundidf.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/builtins/floatundidf.c b/lib/builtins/floatundidf.c
index 73b8bac1c..67aa86e5e 100644
--- a/lib/builtins/floatundidf.c
+++ b/lib/builtins/floatundidf.c
@@ -32,9 +32,9 @@ ARM_EABI_FNALIAS(ul2d, floatundidf)
COMPILER_RT_ABI double
__floatundidf(du_int a)
{
- static const double twop52 = 0x1.0p52;
- static const double twop84 = 0x1.0p84;
- static const double twop84_plus_twop52 = 0x1.00000001p84;
+ static const double twop52 = 4503599627370496.0; // 0x1.0p52
+ static const double twop84 = 19342813113834066795298816.0; // 0x1.0p84
+ static const double twop84_plus_twop52 = 19342813118337666422669312.0; // 0x1.00000001p84
union { uint64_t x; double d; } high = { .d = twop84 };
union { uint64_t x; double d; } low = { .d = twop52 };