summaryrefslogtreecommitdiffstats
path: root/compiler-rt/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
commitb5bba5c256f4fb07288c4517dbe6abbf2d85ee3d (patch)
tree7bf75857d60d369f6872571c336f6b6cda98eb31 /compiler-rt/lib/builtins/floatundidf.c
parentf415791bda664c481dd125fd5d2c6c6087338249 (diff)
downloadbcm5719-llvm-b5bba5c256f4fb07288c4517dbe6abbf2d85ee3d.tar.gz
bcm5719-llvm-b5bba5c256f4fb07288c4517dbe6abbf2d85ee3d.zip
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
Diffstat (limited to 'compiler-rt/lib/builtins/floatundidf.c')
-rw-r--r--compiler-rt/lib/builtins/floatundidf.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler-rt/lib/builtins/floatundidf.c b/compiler-rt/lib/builtins/floatundidf.c
index 73b8bac1c1a..67aa86e5e5b 100644
--- a/compiler-rt/lib/builtins/floatundidf.c
+++ b/compiler-rt/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 };
OpenPOWER on IntegriCloud