From b5bba5c256f4fb07288c4517dbe6abbf2d85ee3d Mon Sep 17 00:00:00 2001 From: Saleem Abdulrasool Date: Thu, 15 Oct 2015 04:26:19 +0000 Subject: 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! llvm-svn: 250365 --- compiler-rt/lib/builtins/floatdidf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'compiler-rt/lib/builtins/floatdidf.c') diff --git a/compiler-rt/lib/builtins/floatdidf.c b/compiler-rt/lib/builtins/floatdidf.c index e53fa2580f6..a300c9f312d 100644 --- a/compiler-rt/lib/builtins/floatdidf.c +++ b/compiler-rt/lib/builtins/floatdidf.c @@ -32,8 +32,8 @@ ARM_EABI_FNALIAS(l2d, floatdidf) COMPILER_RT_ABI double __floatdidf(di_int a) { - static const double twop52 = 0x1.0p52; - static const double twop32 = 0x1.0p32; + static const double twop52 = 4503599627370496.0; // 0x1.0p52 + static const double twop32 = 4294967296.0; // 0x1.0p32 union { int64_t x; double d; } low = { .d = twop52 }; -- cgit v1.2.3